@@ -72,18 +72,23 @@ impl OnchainEventEntry {
72
72
}
73
73
}
74
74
75
- /// Upon discovering of some classes of onchain tx by ChannelMonitor, we may have to take actions on it
76
- /// once they mature to enough confirmations (ANTI_REORG_DELAY)
75
+ /// Events for claims the [`OnchainTxHandler`] has generated. Once the events are considered safe
76
+ /// from a chain reorg, the [`OnchainTxHandler`] will act accordingly.
77
77
#[ derive( PartialEq , Eq ) ]
78
78
enum OnchainEvent {
79
- /// Outpoint under claim process by our own tx, once this one get enough confirmations, we remove it from
80
- /// bump-txn candidate buffer.
79
+ /// A pending request has been claimed by a transaction spending the exact same set of outpoints
80
+ /// as the request. This claim can either be ours or from the counterparty. Once the claiming
81
+ /// transaction has met [`ANTI_REORG_DELAY`] confirmations, we consider it final and remove the
82
+ /// pending request.
81
83
Claim {
82
84
package_id : PackageID ,
83
85
} ,
84
- /// Claim tx aggregate multiple claimable outpoints. One of the outpoint may be claimed by a counterparty party tx.
85
- /// In this case, we need to drop the outpoint and regenerate a new claim tx. By safety, we keep tracking
86
- /// the outpoint to be sure to resurect it back to the claim tx if reorgs happen.
86
+ /// The counterparty has claimed an outpoint from one of our pending requests through a
87
+ /// different transaction than ours. If our transaction was attempting to claim multiple
88
+ /// outputs, we need to drop the outpoint claimed by the counterparty and regenerate a new claim
89
+ /// transaction for ourselves. We keep tracking, separately, the outpoint claimed by the
90
+ /// counterparty up to [`ANTI_REORG_DELAY`] confirmations to ensure we attempt to re-claim it
91
+ /// if the counterparty's claim is reorged from the chain.
87
92
ContentiousOutpoint {
88
93
package : PackageTemplate ,
89
94
}
0 commit comments