more work

This commit is contained in:
realbigsean
2023-04-11 13:13:13 -04:00
parent 66e09f49d7
commit 25ff6e8a5f
13 changed files with 918 additions and 477 deletions

View File

@@ -438,7 +438,7 @@ fn test_parent_lookup_too_many_attempts() {
}
}
if i < parent_lookup::PARENT_FAIL_TOLERANCE {
assert_eq!(bl.parent_lookups[0].failed_attempts(), dbg!(i));
assert_eq!(bl.parent_lookups[0].failed_block_attempts(), dbg!(i));
}
}
@@ -477,7 +477,7 @@ fn test_parent_lookup_too_many_download_attempts_no_blacklist() {
rig.expect_penalty();
}
if i < parent_lookup::PARENT_FAIL_TOLERANCE {
assert_eq!(bl.parent_lookups[0].failed_attempts(), dbg!(i));
assert_eq!(bl.parent_lookups[0].failed_block_attempts(), dbg!(i));
}
}
@@ -607,7 +607,7 @@ fn test_single_block_lookup_ignored_response() {
// after processing.
bl.single_block_lookup_response(id, peer_id, None, D, &mut cx);
// Send an Ignored response, the request should be dropped
bl.single_block_processed(id, BlockProcessResult::Ignored, &mut cx);
bl.single_block_processed(id, BlockOrBlobProcessResult::Ignored, &mut cx);
rig.expect_empty_network();
assert_eq!(bl.single_block_lookups.len(), 0);
}
@@ -631,7 +631,7 @@ fn test_parent_lookup_ignored_response() {
rig.expect_empty_network();
// Return an Ignored result. The request should be dropped
bl.parent_block_processed(chain_hash, BlockProcessResult::Ignored, &mut cx);
bl.parent_block_processed(chain_hash, BlockOrBlobProcessResult::Ignored, &mut cx);
rig.expect_empty_network();
assert_eq!(bl.parent_lookups.len(), 0);
}