You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test(node): prove the reclaim sweep returns when a reclaim receipt never arrives #2495
No test proves that the reclaim sweep returns when a reclaim receipt never arrives.
#2492 bounded the receipt wait in reclaim_once (crates/node/src/buyer_pool.rs) with await_receipt(pending, Some(RECEIPT_TIMEOUT)). A lapse warns "reclaim sweep: reclaim receipt not read; the next sweep retries" and meters decdn_buyer_reclaim_failures_total.
The only test of that arm, an_unreadable_sweep_reclaim_receipt_logs_the_tx (crates/node/src/buyer_pool/tests.rs), uses a mock Asserter. The receipt read fails at once, so the test passes with or without the bound. If the bound is removed, one dropped reclaim stalls the hourly sweep again, and no test fails.
Fix direction
Add a paused-clock test on ScriptedRpc::parked_receipt (decdn-incentivetest-util). The reclaim sends, and its receipt never arrives. sweep_reclaimable_once must return after RECEIPT_TIMEOUT.
ScriptedRpc leaves every unscripted call pending. The test must script what the sweep reads before the send: getPool (an eth_call) and the chain-head read. A call it does not answer parks the sweep before the receipt wait.
Checks
The test passes with the bound.
The test fails, by a timeout or by hanging, when await_receipt takes None. Do this mutation check by hand.
The row stays, and decdn_buyer_reclaim_failures_total is 1.
Activity