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

Commit 15f0af0

Browse files
authored
Added a try / catch to limit issue with popping off an empty log list when reverting state snapshots
1 parent d630de4 commit 15f0af0

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

ethereum/state.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,8 +258,11 @@ def revert(self, snapshot):
258258
h, L, auxvars = snapshot
259259
three_touched = self.cache[THREE].touched if THREE in self.cache else False # Compatibility with weird geth+parity bug
260260
while len(self.journal) > L:
261-
lastitem = self.journal.pop()
262-
lastitem()
261+
try:
262+
lastitem = self.journal.pop()
263+
lastitem()
264+
except Exception as e:
265+
print(e)
263266
if h != self.trie.root_hash:
264267
assert L == 0
265268
self.trie.root_hash = h

0 commit comments

Comments
 (0)