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

Commit 9a3de4f

Browse files
author
Jan Xie
committed
set chain score on snapshot load
1 parent 253b7d4 commit 9a3de4f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ethereum/snapshot.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ def load_snapshot(chain, snapshot):
108108
trie = load_state(chain.env, snapshot['alloc'])
109109
assert trie.root_hash == base_header.state_root
110110
chain.state.trie = trie
111+
chain.env.db.put('score:' + base_header.hash, snapshot['chainDifficulty'])
112+
chain.env.db.commit()
111113

112114
print "Start loading recent blocks from snapshot"
113115
vbh = state_transition.validate_block_header

0 commit comments

Comments
 (0)