core/rawdb: fix reinit regression caused by the hash check PR

ChrisChinchilla-patch-3
Péter Szilágyi 5 years ago
parent 23c8c74131
commit 717f8a4e8f
No known key found for this signature in database
GPG Key ID: E9AE538CEDF8293D
  1. 8
      core/rawdb/freezer_reinit.go

@ -55,10 +55,10 @@ func InitDatabaseFromFreezer(db ethdb.Database) error {
if n >= frozen { if n >= frozen {
return return
} }
// Retrieve the block from the freezer (no need for the hash, we pull by // Retrieve the block from the freezer. If successful, pre-cache
// number from the freezer). If successful, pre-cache the block hash and // the block hash and the individual transaction hashes for storing
// the individual transaction hashes for storing into the database. // into the database.
block := ReadBlock(db, common.Hash{}, n) block := ReadBlock(db, ReadCanonicalHash(db, n), n)
if block != nil { if block != nil {
block.Hash() block.Hash()
for _, tx := range block.Transactions() { for _, tx := range block.Transactions() {

Loading…
Cancel
Save