mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore: check genesis mismatch in init_genesis (#1560)
This commit is contained in:
@ -49,16 +49,7 @@ impl InitCommand {
|
||||
info!(target: "reth::cli", "Database opened");
|
||||
|
||||
info!(target: "reth::cli", "Writing genesis block");
|
||||
let genesis_hash = init_genesis(db, self.chain.clone())?;
|
||||
|
||||
if genesis_hash != self.chain.genesis_hash() {
|
||||
// TODO: better error text
|
||||
return Err(eyre::eyre!(
|
||||
"Genesis hash mismatch: expected {}, got {}",
|
||||
self.chain.genesis_hash(),
|
||||
genesis_hash
|
||||
))
|
||||
}
|
||||
init_genesis(db, self.chain.clone())?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user