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

Commit d3b8573

Browse files
committed
Add a check in tester.direct_tx
To prevent from the error when `self.last_sender` is `None` already
1 parent 85efc86 commit d3b8573

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ethereum/tools/tester.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ def __init__(self, alloc=base_alloc, env=None, genesis=None):
157157

158158
def direct_tx(self, transaction):
159159
self.last_tx = transaction
160-
if privtoaddr(self.last_sender) != transaction.sender:
160+
if self.last_sender is not None and privtoaddr(self.last_sender) != transaction.sender:
161161
self.last_sender = None
162162
success, output = apply_transaction(self.head_state, transaction)
163163
self.block.transactions.append(transaction)

0 commit comments

Comments
 (0)