Improve parent lookup logging (#5451)

* upgrade parent lookup result processing logs to debug, use display instead of debug for BlockError in case a blob parent unknown error is hit, add block root to BlockIsAlreadyKnown

* fix compile

* fix compile

* fix compile
This commit is contained in:
realbigsean
2024-03-22 14:16:13 -04:00
committed by GitHub
parent 5ce16192c7
commit 21cdc64bfe
8 changed files with 30 additions and 22 deletions

View File

@@ -458,7 +458,11 @@ fn test_parent_lookup_happy_path() {
rig.expect_empty_network();
// Processing succeeds, now the rest of the chain should be sent for processing.
bl.parent_block_processed(chain_hash, BlockError::BlockIsAlreadyKnown.into(), &mut cx);
bl.parent_block_processed(
chain_hash,
BlockError::BlockIsAlreadyKnown(block_root).into(),
&mut cx,
);
rig.expect_parent_chain_process();
let process_result = BatchProcessResult::Success {
was_non_empty: true,
@@ -1117,7 +1121,11 @@ fn test_same_chain_race_condition() {
// the processing result
if i + 2 == depth {
// one block was removed
bl.parent_block_processed(chain_hash, BlockError::BlockIsAlreadyKnown.into(), &mut cx)
bl.parent_block_processed(
chain_hash,
BlockError::BlockIsAlreadyKnown(block.canonical_root()).into(),
&mut cx,
)
} else {
bl.parent_block_processed(
chain_hash,