mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-03 09:37:38 +00:00
better error (#4907)
Co-authored-by: giuliorebuffo <giuliorebuffo@system76-pc.localdomain>
This commit is contained in:
parent
0640e946dd
commit
311d18ae92
@ -156,8 +156,12 @@ type GenesisMismatchError struct {
|
||||
}
|
||||
|
||||
func (e *GenesisMismatchError) Error() string {
|
||||
config := params.ChainConfigByGenesisHash(e.Stored)
|
||||
if config == nil {
|
||||
return fmt.Sprintf("database contains incompatible genesis (have %x, new %x)", e.Stored, e.New)
|
||||
}
|
||||
return fmt.Sprintf("database contains incompatible genesis (try with --chain=%s)", config.ChainName)
|
||||
}
|
||||
|
||||
// CommitGenesisBlock writes or updates the genesis block in db.
|
||||
// The block that will be used is:
|
||||
|
Loading…
Reference in New Issue
Block a user