Fix Reorg Indexing on Proof-of-Stake (#3538)

* little fix

* feed pos
This commit is contained in:
Giulio rebuffo 2022-02-18 17:03:47 +01:00 committed by GitHub
parent d5b51e15f5
commit 5db869236a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1040,6 +1040,10 @@ func (hi *HeaderInserter) FeedHeaderPoS(db kv.GetPut, header *types.Header, hash
return fmt.Errorf("[%s] failed to store header: %w", hi.logPrefix, err)
}
if err = db.Put(kv.HeaderNumber, hash[:], dbutils.EncodeBlockNumber(blockHeight)); err != nil {
return fmt.Errorf("[%s] failed to store header: %w", hi.logPrefix, err)
}
hi.highest = blockHeight
hi.highestHash = hash
hi.highestTimestamp = header.Time