Skip to content

Commit 3339d7e

Browse files
committed
fix block.transaction mutation
1 parent 6c7cf77 commit 3339d7e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ethereum/tools/tester.py

+3
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,9 @@ def snapshot(self):
291291
def revert(self, snapshot):
292292
state_snapshot, txcount, blknum = snapshot
293293
assert blknum == self.block.number, "Cannot revert beyond block boundaries!"
294+
self.block = self.block.copy(
295+
transactions=self.block.transactions[:txcount]
296+
)
294297
self.block.transactions = self.block.transactions[:txcount]
295298
self.head_state.revert(state_snapshot)
296299

0 commit comments

Comments
 (0)