add prefix for contract code (#4397)

pull/4406/head
Gheis Mohammadi 2 years ago committed by GitHub
parent 0a18d16504
commit 3ea6ebfa7d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      core/rawdb/schema.go

@ -183,8 +183,7 @@ func skeletonHeaderKey(number uint64) []byte {
// codeKey = CodePrefix + hash
func codeKey(hash common.Hash) []byte {
// We don't use any prefix for code key, otherwise we should return append(CodePrefix, hash.Bytes()...)
return hash.Bytes()
return append(CodePrefix, hash.Bytes()...)
}
// IsCodeKey reports whether the given byte slice is the key of contract code,

Loading…
Cancel
Save