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

Commit 42ce71d

Browse files
author
Jan Xie
committed
fix EIP161 nonce rule
1 parent 0eb63fe commit 42ce71d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ethereum/processblock.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,8 @@ def create_contract(ext, msg):
142142
# assert not ext.get_code(msg.to)
143143
msg.data = vm.CallData([], 0, 0)
144144
snapshot = ext.snapshot()
145-
ext.set_nonce(msg.to, 1)
145+
if ext.post_spurious_dragon_hardfork():
146+
ext.set_nonce(msg.to, 1)
146147
res, gas, dat = _apply_msg(ext, msg, code)
147148
assert utils.is_numeric(gas)
148149
log_msg.debug('CONTRACT CREATION FINISHED', res=res, gas=gas, dat=dat)

0 commit comments

Comments
 (0)