Skip to content

node: service-level test that the shutdown redeem sweep applies the configured floor #2235

Closed

Description

@yigitdot

What

A test that constructs a PoolSettlementService against a mocked provider, seeds one lane below blockchain.redeem_threshold_micro_usdc, calls shutdown(), and asserts no redeemMany was submitted (and, with the lane above the floor, that one was).

Why

final_redeem_sweep passes self.redeem_threshold (crates/node/src/payment_settlement.rs:445), and the docs now state that every path — graceful shutdown included — applies the configured per-chunk floor. Nothing fails if someone reinserts a U256::ZERO floor at that call site: chunk_redemptions_zero_floor_keeps_everything and a_zero_floor_still_reads_every_lane test the zero-floor mechanics, the opposite direction. The mocked-provider patterns in the same file (a_sub_floor_plan_set_reads_nothing_from_the_chain) may extend to service construction; if they do not, this needs a small bootstrap seam.

History: the only zero-floor caller was the close-redeem path removed in #1761. Docs claiming shutdown used a zero floor misled a review on #2191 (see the docs/runbook.md thread); this test keeps the corrected canon honest.

Surfaced by the second review pass on #2191.

Activity

  1. added
    kind:test
    prio:low
    status:mainnet-blocking
    area:node
    area:payments
    on Sep 29, 2026
  2. self-assigned this
    on Oct 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:nodearea:paymentskind:testprio:lowstatus:mainnet-blocking

Type

No type

Fields

Priority

None yet

Projects

  • Status
    Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions