Skip to content

Commit

Permalink
eth/protocols/snap: make snap look up code by prefix only
Browse files Browse the repository at this point in the history
  • Loading branch information
holiman committed Jan 24, 2022
1 parent 72812ba commit bd733e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion eth/protocols/snap/handler.go
Expand Up @@ -467,7 +467,7 @@ func ServiceGetByteCodesQuery(chain *core.BlockChain, req *GetByteCodesPacket) [
// Peers should not request the empty code, but if they do, at
// least sent them back a correct response without db lookups
codes = append(codes, []byte{})
} else if blob, err := chain.ContractCode(hash); err == nil {
} else if blob, err := chain.ContractCodeWithPrefix(hash); err == nil {
codes = append(codes, blob)
bytes += uint64(len(blob))
}
Expand Down

0 comments on commit bd733e9

Please sign in to comment.