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,7 +156,11 @@ type GenesisMismatchError struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (e *GenesisMismatchError) Error() string {
|
func (e *GenesisMismatchError) Error() string {
|
||||||
return fmt.Sprintf("database contains incompatible genesis (have %x, new %x)", e.Stored, e.New)
|
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.
|
// CommitGenesisBlock writes or updates the genesis block in db.
|
||||||
|
Loading…
Reference in New Issue
Block a user