mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2025-05-04 09:02:28 +00:00
vm: implement ASSERT/ABORT opcodes
Rename THROWIFNOT to ASSERT, add ABORT opcode. ABORT cannot be caught, but the implementation should be postponed until exception handling is implemented.
This commit is contained in:
parent
963a70d54a
commit
977c431bf1
9 changed files with 104 additions and 98 deletions
|
@ -424,7 +424,7 @@ func TestCreateBasicChain(t *testing.T) {
|
|||
func newNEP5Transfer(sc, from, to util.Uint160, amount int64) *transaction.Transaction {
|
||||
w := io.NewBufBinWriter()
|
||||
emit.AppCallWithOperationAndArgs(w.BinWriter, sc, "transfer", from, to, amount)
|
||||
emit.Opcode(w.BinWriter, opcode.THROWIFNOT)
|
||||
emit.Opcode(w.BinWriter, opcode.ASSERT)
|
||||
|
||||
script := w.Bytes()
|
||||
return transaction.NewInvocationTX(script, 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue