Skip to content

Commit

Permalink
eth/protocols/snap: fix account format in trie
Browse files Browse the repository at this point in the history
  • Loading branch information
karalabe committed Apr 16, 2021
1 parent 81ae468 commit 0c18c4c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion eth/protocols/snap/sync.go
Expand Up @@ -850,7 +850,8 @@ func (s *Syncer) generateAccountTrie() {
}
// Account seems to be complete, insert it into the state trie
acchash := it.Key()[1:]
t.TryUpdate(acchash, common.CopyBytes(it.Value()))
accblob, _ := rlp.EncodeToBytes(account)
t.TryUpdate(acchash, accblob)

if batch.ValueSize() > ethdb.IdealBatchSize {
s.accountBytes += common.StorageSize(batch.ValueSize())
Expand Down

0 comments on commit 0c18c4c

Please sign in to comment.