Skip to content
This repository was archived by the owner on May 23, 2023. It is now read-only.

Commit d630de4

Browse files
authored
Fixed issue where child tx failure wouldn't result in vm throwing TransactionFailed
If you had something like this ```def foo(): x = self.bar() return(x) def bar(): ~invalid()``` Calling self.foo() in pyethereum would *not* result in a transaction failure but instead just return 0 2f8efd7 it last worked in that commit I think it was broken sometime before this commit : 0a7417f This commit I'm making here fixes it (there may be a better more elegant way of fixing it, but at least this fix makes it so all the contracts that use this pattern are no longer broken).
1 parent 271f367 commit d630de4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ethereum/vm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,7 @@ def vm_execute(ext, msg, code):
637637
# Get result
638638
result, gas, data = ext.msg(call_msg)
639639
if result == 0:
640-
stk.append(0)
640+
return vm_exception('Child Call Failed')
641641
else:
642642
stk.append(1)
643643
# Set output memory

0 commit comments

Comments
 (0)