eth: ignore genesis block on importChain

This commit is contained in:
Marius van der Wijden 2023-08-21 09:08:38 +02:00
parent 386cba15b5
commit ef8086a287

View file

@ -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++
}