pub enum ChainEvent {
Tip {
height: Height,
hash: Hash,
time: u32,
header: EventHeader,
},
Fork {
height: Height,
competing_tips: [EventHeader; 2],
depth: u32,
},
Reorg {
fork_height: Height,
depth: u32,
deactivated_headers: Vec<EventHeader>,
new_tip: EventHeader,
},
Invalidated {
block_hash: Hash,
},
Frozen {
outpoint: Outpoint,
},
TipAge {
seconds: u64,
tip: EventHeader,
},
Split {
key: String,
fork_height: Height,
tips: [SplitTip; 2],
},
SplitResolved {
key: String,
fork_height: Height,
},
}Expand description
The six #32 events of version 1 and the two split events of version 2,
serialized and deserialized with v and kind; each kind selects its
version. [SRC] rust-chaintracks@a62f9ed docs/CHAIN-EVENTS.md:24-35;
chaintracks-cloudflare@v0.4.1 src/events.rs:59-108, docs/SPLITS.md:68-83.
For typed host faults, use decode_envelope.
Variants§
Tip
A new active tip. Only suspect transactions need a recheck.
Fields
header: EventHeaderThe new tip’s header.
Fork
A fork that has not resolved.
Fields
competing_tips: [EventHeader; 2]The tips of the two competing branches.
Reorg
Blocks at or above a fork point have been replaced.
Fields
deactivated_headers: Vec<EventHeader>The headers that left the active chain.
new_tip: EventHeaderThe active tip after the reorg.
Invalidated
The alert system invalidated a block.
Frozen
A frozen output. The wallet owns its meaning; it moves no tracker word.
TipAge
Tip age. The header snapshot implements the fail closed response.
Fields
tip: EventHeaderThe tip whose age is reported.
Split
Version 2: two rungs follow different branches past the split depth. An observation, not a reorg: it changes no tip and writes no word.
Fields
SplitResolved
Version 2: no pair of rungs still straddles the split with this key.