Skip to content

Commit

Permalink
dbg: Panic on InsertBlockError
Browse files Browse the repository at this point in the history
Attempt to get more information when there is a
"Failed to insert block" error. This is to try to get more
information for issue 7430:
  paradigmxyz#7430
  • Loading branch information
winksaville committed Apr 9, 2024
1 parent 54f75cd commit cd1c2bf
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions crates/interfaces/src/blockchain_tree/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,14 +155,15 @@ struct InsertBlockErrorData {

impl std::fmt::Display for InsertBlockErrorData {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(
f,
"Failed to insert block (hash={}, number={}, parent_hash={}): {}",
self.block.hash(),
self.block.number,
self.block.parent_hash,
self.kind
)
//write!(
// f,
// "Failed to insert block (hash={}, number={}, parent_hash={}): {}",
// self.block.hash(),
// self.block.number,
// self.block.parent_hash,
// self.kind
//)
panic!("Wink: Failed to insert block, {self:?}")
}
}

Expand Down

0 comments on commit cd1c2bf

Please sign in to comment.