Skip to content
This repository has been archived by the owner on Nov 15, 2021. It is now read-only.

Commit

Permalink
Merge branch 'master' into development
Browse files Browse the repository at this point in the history
  • Loading branch information
localhuman committed Oct 8, 2017
2 parents b2470bc + f7efe14 commit 338d71a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
9 changes: 9 additions & 0 deletions neo/VM/ExecutionEngine.py
Original file line number Diff line number Diff line change
Expand Up @@ -763,6 +763,15 @@ def ExecuteOp(self, opcode, context):

estack.PushT(Struct(items))

elif opcode == THROW:
self._VMState |= VMState.FAULT
return

elif opcode == THROWIFNOT:
if estack.Pop().GetBoolean() == False:
self._VMState |= VMState.FAULT
return

else:

self._VMState |= VMState.FAULT
Expand Down
5 changes: 5 additions & 0 deletions neo/VM/OpCode.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@
TAILCALL = b'\x69'


# Exceptions
THROW = b'\xf0'
THROWIFNOT = b'\xf1'


# Stack
DUPFROMALTSTACK = b'\x6A'
TOALTSTACK = b'\x6B' # Puts the input onto the top of the alt stack. Removes it from the main stack.
Expand Down
2 changes: 1 addition & 1 deletion prompt.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ class PromptInterface(object):
'wallet {verbose}',
'wallet rebuild {start block}',
'send {assetId or name} {address} {amount}',
'testinvoke contract {contract hash} {params}',
'testinvoke {contract hash} {params}',
'invoke',
'cancel',
]
Expand Down

0 comments on commit 338d71a

Please sign in to comment.