@@ -87,6 +87,8 @@ pub(crate) enum AbortReason {
87
87
// │ │
88
88
// └──────────────────────────────┘
89
89
//
90
+
91
+ // Channel states that can receive `(send|receive)_tx_(add|remove)_(input|output)`
90
92
pub ( crate ) trait AcceptingChanges { }
91
93
92
94
/// We are currently in the process of negotiating the transaction.
@@ -364,6 +366,8 @@ impl<S> InteractiveTxStateMachine<S>
364
366
365
367
impl InteractiveTxStateMachine < TheirTxComplete > {
366
368
fn send_tx_complete ( self ) -> InteractiveTxStateMachine < NegotiationComplete > {
369
+ // TODO: Should we validate before transitioning states? If so, do we want to abort negotiation
370
+ // if our current transaction state is invalid?
367
371
InteractiveTxStateMachine {
368
372
context : self . context ,
369
373
state : NegotiationComplete { }
@@ -383,6 +387,8 @@ impl InteractiveTxStateMachine<Negotiating> {
383
387
}
384
388
385
389
fn send_tx_complete ( self ) -> InteractiveTxStateMachine < OurTxComplete > {
390
+ // TODO: Should we validate before transitioning states? If so, do we want to abort negotiation
391
+ // if our current transaction state is invalid?
386
392
InteractiveTxStateMachine {
387
393
context : self . context ,
388
394
state : OurTxComplete { }
@@ -452,7 +458,6 @@ impl InteractiveTxConstructor {
452
458
}
453
459
}
454
460
455
- // Functions that handle the case where mode is [`ChannelMode::Negotiating`]
456
461
fn abort_negotation ( & mut self , reason : AbortReason ) {
457
462
self . handle_negotiating_receive ( |state_machine| state_machine. abort_negotiation ( reason) )
458
463
}
0 commit comments