FeedHeaderPoS already writes header number (#4626)

* FeedHeaderPoS already calls WriteHeaderNumber

* Moreover, WriteHeader already writes to HeaderNumber
This commit is contained in:
Andrew Ashikhmin 2022-07-04 11:28:10 +02:00 committed by GitHub
parent 2a0fda33dd
commit 00ee68e4a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 7 deletions

View File

@ -584,10 +584,6 @@ func verifyAndSaveNewPoSHeader(
}, false, nil
}
if err := rawdb.WriteHeaderNumber(tx, headerHash, headerNumber); err != nil {
return nil, false, err
}
if err := headerInserter.FeedHeaderPoS(tx, header, headerHash); err != nil {
return nil, false, err
}

View File

@ -898,9 +898,6 @@ func (hi *HeaderInserter) FeedHeaderPoS(db kv.GetPut, header *types.Header, hash
return fmt.Errorf("[%s] failed to WriteTd: %w", hi.logPrefix, err)
}
rawdb.WriteHeader(db, header)
if err = rawdb.WriteHeaderNumber(db, hash, blockHeight); err != nil {
return err
}
hi.highest = blockHeight
hi.highestHash = hash