all: change chain head markers from block to header (#26777)

This commit is contained in:
Péter Szilágyi authored and GitHub committed 2023-03-02 08:29:15 +02:00
1 parent e1b98f49a5
commit cd31f2dee2
41 files changed
+462 -412

No files matched your search

+1 -1
View File
@@ -222,7 +222,7 @@ func missingBlocks(chain *core.BlockChain, blocks []*types.Block) []*types.Block
head := chain.CurrentBlock()
for i, block := range blocks {
// If we're behind the chain head, only check block, state is available at head
if head.NumberU64() > block.NumberU64() {
if head.Number.Uint64() > block.NumberU64() {
if !chain.HasBlock(block.Hash(), block.NumberU64()) {
return blocks[i:]
}