Skip to content

fix: pool batch summary counts a maybe-broadcast tx as failed #2427

Closed

Description

@thiras

Problem

decdn pool close --all and pool reclaim --all count every per-pool error as failed in BatchTally (crates/cli/src/commands/pool.rs). That includes a send that may have broadcast (#2416) and a receipt that could not be read. The summary line, the final batch_result error ("N pool(s) failed to close; see the summary above") and the exit code all report a definite failure.

The per-pool line keeps the warning. But an operator or a wrapper that reads only the last line or the exit code sees "failed", and may re-run while a tx is still in flight.

Fix

Add an unconfirmed count to BatchTally. Count an error there when its tx outcome is unknown: the send failed with send_broadcast_unknown, or the receipt could not be read after a broadcast. Name the count in the summary and in the batch_result error, e.g. "… of which M may have broadcast — check this signer's transactions before re-running". The send helpers need a typed marker so the batch loop can tell the cases apart without matching text.

Checks

  • A mocked-provider batch test: a transport-failed send counts as unconfirmed, not as a plain failure, and the final error names it.
  • A JSON-RPC rejection still counts as failed.

Activity

  1. self-assigned this
    on Oct 12, 2026
  2. added
    kind:bug
    area:cli
    on Oct 12, 2026
  3. assigned and unassigned on Oct 12, 2026
  4. moved this from Backlog to In progress in deCDNon Oct 12, 2026
  5. moved this from In progress to Done in deCDNon Oct 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:clikind:bug

Type

No type

Fields

Priority

None yet

Projects

  • Status
    Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions