Skip to main content

cancel_outcome

Function cancel_outcome 

Source
pub fn cancel_outcome(
    sent: bool,
    support: CancelSupport,
    confirmed_charge: Option<Charge>,
) -> CancelOutcome
Expand description

Decide the acknowledgement of a cancelled attempt.

  • sent == false (no request byte can ever leave; see crate::wire::SentTracker::try_abort): stopped, observed{0}.
  • sent, support == confirmed and the remote side confirmed the stop with confirmed_charge within the budget: stopped with that charge.
  • otherwise: unconfirmed, charge unknown, possibly continuing.