pub enum SpendFailureStage {
Signing,
Broadcast,
Confirmation,
}Expand description
Where an attempt died.
Coarse and stable on purpose: the point is which STEP failed, because that is what tells a person whether their money is at risk. This distinction is load-bearing and MUST NOT be flattened into a bare “failed”. A client that collapses it is structurally unable to tell someone the truth about their own money.
Variants§
Signing
The spend could not be built or signed. No signed bundle ever existed, so nothing could reach a mempool and nothing moved.
Broadcast
A signed bundle was rejected by the mempool, as far as this node saw. The bundle may still have reached the network by another route, or been accepted after the rejection this node observed.
Confirmation
The bundle went out and the chain then reported it could not succeed.
Implementations§
Source§impl SpendFailureStage
impl SpendFailureStage
Sourcepub fn money_may_have_moved(self) -> bool
pub fn money_may_have_moved(self) -> bool
Could the money have moved anyway, despite the attempt failing at this stage?
Signing is the only stage that answers NO, and it answers structurally: no
signed bundle existed, so there was nothing that could reach a mempool.
Broadcast and Confirmation both happen AFTER a
valid signed bundle exists, and neither observation proves absence — a rejection this node
saw does not bind a network it does not fully observe.
This is the ONE place the distinction is decided. Every consumer asks the stage rather than
re-listing the variants, so the “it did not happen” claim cannot be re-attached to a stage
that never earned it. Written as an exhaustive match so adding a stage is a compile error
here, forcing whoever adds it to choose a side.
Trait Implementations§
Source§impl Clone for SpendFailureStage
impl Clone for SpendFailureStage
Source§fn clone(&self) -> SpendFailureStage
fn clone(&self) -> SpendFailureStage
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more