Skip to content

fix(client,cli): a second Ctrl-C between a receipt read and its record names no escrow #2515

Closed

Description

@thiras

Problem

open_pool and top_up remove the tx from UnconfirmedEscrows as soon as they read its receipt (open_pool, top_up). The caller writes the local record or credit after that, as a synchronous store write. During that write, the tx is in no list: it is not pending, and it is not held as untracked yet (#2511).

The Ctrl-C watcher runs on another worker thread. A second Ctrl-C in that window calls std::process::exit at once. The exit names no escrow, and the record write does not finish. The re-run reads an uncredited row and escrows again.

The first Ctrl-C cannot hit this window, because a future drops only at an .await. The window is short (one store write with fsync), so this is low.

Fix direction

  • Release the pending entry only after the caller's record or credit commits. Or:
  • Hold a lock from the receipt read to the record write, and take it in the immediate exit before it prints.

Checks

  • A second Ctrl-C between the receipt read and the record write names the tx.

Found in the #2511 review (silent-failure pass). This behavior existed before #2511.

Activity

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

Metadata

Metadata

Assignees

Labels

area:paymentskind:bugprio:lowrust

Type

No type

Fields

Priority

None yet

Projects

  • Status
    Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions