mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-08 20:11:21 +00:00
FeedHeaderPoS already writes header number (#4626)
* FeedHeaderPoS already calls WriteHeaderNumber * Moreover, WriteHeader already writes to HeaderNumber
This commit is contained in:
parent
2a0fda33dd
commit
00ee68e4a1
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user