Skip to content

Commit 28cd352

Browse files
authored
improvement: add chain id to error message (#514)
1 parent 5791d32 commit 28cd352

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

crates/edr_evm/src/blockchain.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,14 @@ pub enum BlockchainError {
5656
expected: B256,
5757
},
5858
/// Missing hardfork activation history
59-
#[error("No known hardfork for execution on historical block {block_number} (relative to fork block number {fork_block_number}). The node was not configured with a hardfork activation history.")]
59+
#[error("No known hardfork for execution on historical block {block_number} (relative to fork block number {fork_block_number}) in chain with id {chain_id}. The node was not configured with a hardfork activation history.")]
6060
MissingHardforkActivations {
6161
/// Block number
6262
block_number: u64,
6363
/// Fork block number
6464
fork_block_number: u64,
65+
/// Chain id
66+
chain_id: u64,
6567
},
6668
/// Missing withdrawals for post-Shanghai blockchain
6769
#[error("Missing withdrawals for post-Shanghai blockchain")]

crates/edr_evm/src/blockchain/forked.rs

+1
Original file line numberDiff line numberDiff line change
@@ -455,6 +455,7 @@ where
455455
Err(BlockchainError::MissingHardforkActivations {
456456
block_number,
457457
fork_block_number: self.fork_block_number,
458+
chain_id: self.remote_chain_id,
458459
})
459460
}
460461
})

0 commit comments

Comments
 (0)