mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 19:09:54 +00:00
chore: allow missing total difficulty when loading node head (#14533)
This commit is contained in:
@ -323,7 +323,9 @@ impl<ChainSpec> NodeConfig<ChainSpec> {
|
||||
|
||||
let total_difficulty = provider
|
||||
.header_td_by_number(head)?
|
||||
.expect("the total difficulty for the latest block is missing, database is corrupt");
|
||||
// total difficulty is effectively deprecated, but still required in some places, e.g.
|
||||
// p2p
|
||||
.unwrap_or_default();
|
||||
|
||||
let hash = provider
|
||||
.block_hash(head)?
|
||||
|
||||
Reference in New Issue
Block a user