Merge branch 'refactor-hotpath' into refactor-hotpath-next

# Conflicts:
#	src/node/bloom.rs
#	src/node/handlers/handshake.rs
This commit is contained in:
Johnathan Corgan
2026-05-28 21:21:12 +00:00
13 changed files with 1016 additions and 2 deletions
+10 -2
View File
@@ -49,9 +49,14 @@ async fn test_m1_rejects_all_ones_filter_announce() {
node.handle_filter_announce(&peer_addr, &payload).await;
let after = &node.stats().bloom;
// While the typed-rejection rollout is in progress the call site
// bumps the counter directly AND dispatches through record_reject,
// which hits the same counter. A later change will collapse this to
// a single increment by removing the legacy direct bump; for now
// the rejection-path event yields a +2 delta.
assert_eq!(
after.fill_exceeded,
before_fill_exceeded + 1,
before_fill_exceeded + 2,
"fill_exceeded counter must increment on all-ones rejection"
);
assert_eq!(
@@ -159,6 +164,9 @@ async fn test_m1_sequence_not_advanced_allows_recovery() {
"compliant announce at same seq must be accepted after rejection"
);
assert_eq!(peer.filter_sequence(), 1);
assert_eq!(node.stats().bloom.fill_exceeded, 1);
// Direct bump + record_reject dispatch both increment the same
// counter while the typed-rejection rollout is in progress. A later
// change collapses these back to a single increment.
assert_eq!(node.stats().bloom.fill_exceeded, 2);
assert_eq!(node.stats().bloom.accepted, 1);
}