eth: ignore genesis block on importChain (#27956)

pull/27961/head
Marius van der Wijden 1 year ago committed by GitHub
parent 5976e58415
commit b3024e8fe6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      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++
}

Loading…
Cancel
Save