From 45ebe0534376322246eabc944596f896ae6fb375 Mon Sep 17 00:00:00 2001 From: gavin Date: Wed, 7 Jan 2026 10:24:30 +0800 Subject: [PATCH] fix(consensus): replace `GetHeaderByHash` with `GetHeader` --- consensus/taiko/consensus.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/consensus/taiko/consensus.go b/consensus/taiko/consensus.go index 32a07b5bb44e..bd0d7d5fe534 100644 --- a/consensus/taiko/consensus.go +++ b/consensus/taiko/consensus.go @@ -189,7 +189,7 @@ func (t *Taiko) verifyHeader(chain consensus.ChainHeaderReader, header, parent * } var parentBlockTime uint64 if header.Number.Cmp(common.Big1) > 0 { - if ancestorBlock := chain.GetHeaderByHash(parent.ParentHash); ancestorBlock != nil { + if ancestorBlock := chain.GetHeader(parent.ParentHash, parent.Number.Uint64()-1); ancestorBlock != nil { parentBlockTime = parent.Time - ancestorBlock.Time } else { return fmt.Errorf("ancestor block not found for parent %s", parent.ParentHash.Hex())