From b3024e8fe6d7615d813d5a803f874aacfd3b3474 Mon Sep 17 00:00:00 2001 From: Marius van der Wijden Date: Mon, 21 Aug 2023 19:32:34 +0200 Subject: [PATCH] eth: ignore genesis block on importChain (#27956) --- eth/api_admin.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/eth/api_admin.go b/eth/api_admin.go index 88d8f5a14..4a3ccb84e 100644 --- a/eth/api_admin.go +++ b/eth/api_admin.go @@ -118,6 +118,10 @@ func (api *AdminAPI) ImportChain(file string) (bool, error) { } else if err != nil { return false, fmt.Errorf("block %d: failed to parse: %v", index, err) } + // ignore the genesis block when importing blocks + if block.NumberU64() == 0 { + continue + } blocks = append(blocks, block) index++ }