Expand description
Graceful Ctrl-C for decdn get, decdn pool open and decdn pool top-up.
The first Ctrl-C resolves Interrupt::wait: the command stops its
transfers, writes what it must keep (the bundle skip-cache, the progress
indicators’ cleanup), and returns Interrupted, which exits with status
130. A second Ctrl-C, or one that arrives after the command stops watching,
exits at once with the same status.
Stopping mid-transfer loses nothing already paid for: every fetch resumes
from its on-disk .partial on the next run. A decdn get run whose
destination is relative keeps that state under the current directory, so
its stop line names the directory to run the command again from
(ResumeFrom). Stopping an openPool or a topUp before its record
commits does not cancel the transaction, so the command names it
(name_held_escrows, and the immediate exit) instead of telling the user to
run it again: a re-run before it confirms escrows a second time. An escrow
that mined with no local record crediting it is named the same way: a re-run
reads the uncredited row and escrows again.
Structs§
- Interrupted
- The error a command returns when Ctrl-C stopped it.
mainprintsstop_messageand exits with status 130 (128 + SIGINT), the shell convention for an interrupted command. - Resume
From - The directory a stopped command must run again from to resume: the one its
relative destination, and so its resume state, resolves against (the
.partialfiles, and a bundle’s.decdn-partial/and.decdn-bundles/). Attached to anInterruptedor aGaveUp, sostop_messagenames it. - Unreconciled
Escrows - The
openPoolandtopUptransactions a command ended with that someone must reconcile against the chain: those it did not see confirm, which may still escrow USDC, and those that escrowed with no local record crediting them. Displays one per line.
Constants§
- GAVE_
UP_ EXIT - The exit status for a fetch that gave up after its no-progress limit:
EX_TEMPFAIL, since a rerun resumes it. - INTERRUPTED_
EXIT - The exit status for an interrupted command: 128 + SIGINT.
Functions§
- stop_
exit - The exit status for a command that stopped rather than failed:
INTERRUPTED_EXITfor a Ctrl-C, andGAVE_UP_EXITfor a give-up.Nonefor any other error, and for a give-up with anopenPoolortopUpin flight or untracked:EX_TEMPFAILtells a wrapper that a re-run is safe, and that one is not. - stop_
message - The line
mainprints for a command that stopped rather than failed: a Ctrl-C, or a give-up after the no-progress limit.Nonefor any other error. The advice to run the command again, after a Ctrl-C or a give-up, names theResumeFromdirectory when the error carries one. AnopenPoolortopUpin flight or untracked replaces that advice, because a re-run before it is reconciled escrows again.