Skip to content

Commit

Permalink
fix: fix code db
Browse files Browse the repository at this point in the history
  • Loading branch information
flywukong committed Jul 15, 2024
1 parent ee179bf commit 7cf1cb0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion eth/protocols/snap/sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -1887,7 +1887,7 @@ func (s *Syncer) processAccountResponse(res *accountResponse) {
for i, account := range res.accounts {
// Check if the account is a contract with an unknown code
if !bytes.Equal(account.CodeHash, types.EmptyCodeHash.Bytes()) {
if !rawdb.HasCodeWithPrefix(s.db.StateStoreReader(), common.BytesToHash(account.CodeHash)) {
if !rawdb.HasCodeWithPrefix(s.db, common.BytesToHash(account.CodeHash)) {
res.task.codeTasks[common.BytesToHash(account.CodeHash)] = struct{}{}
res.task.needCode[i] = true
res.task.pend++
Expand Down

0 comments on commit 7cf1cb0

Please sign in to comment.