@@ -161,7 +161,7 @@ pub enum SpendableOutputDescriptor {
161
161
///
162
162
/// To derive the revocation_pubkey provided here (which is used in the witness
163
163
/// script generation), you must pass the counterparty revocation_basepoint (which appears in the
164
- /// call to Sign::ready_channel ) and the provided per_commitment point
164
+ /// call to Sign::provide_channel_parameters ) and the provided per_commitment point
165
165
/// to chan_utils::derive_public_revocation_key.
166
166
///
167
167
/// The witness script which is hashed and included in the output script_pubkey may be
@@ -377,7 +377,7 @@ pub trait BaseSign {
377
377
/// We bind holder_selected_contest_delay late here for API convenience.
378
378
///
379
379
/// Will be called before any signatures are applied.
380
- fn ready_channel ( & mut self , channel_parameters : & ChannelTransactionParameters ) ;
380
+ fn provide_channel_parameters ( & mut self , channel_parameters : & ChannelTransactionParameters ) ;
381
381
}
382
382
383
383
/// A cloneable signer.
@@ -580,39 +580,39 @@ impl InMemorySigner {
580
580
}
581
581
582
582
/// Counterparty pubkeys.
583
- /// Will panic if ready_channel wasn't called.
583
+ /// Will panic if provide_channel_parameters wasn't called.
584
584
pub fn counterparty_pubkeys ( & self ) -> & ChannelPublicKeys { & self . get_channel_parameters ( ) . counterparty_parameters . as_ref ( ) . unwrap ( ) . pubkeys }
585
585
586
586
/// The contest_delay value specified by our counterparty and applied on holder-broadcastable
587
587
/// transactions, ie the amount of time that we have to wait to recover our funds if we
588
588
/// broadcast a transaction.
589
- /// Will panic if ready_channel wasn't called.
589
+ /// Will panic if provide_channel_parameters wasn't called.
590
590
pub fn counterparty_selected_contest_delay ( & self ) -> u16 { self . get_channel_parameters ( ) . counterparty_parameters . as_ref ( ) . unwrap ( ) . selected_contest_delay }
591
591
592
592
/// The contest_delay value specified by us and applied on transactions broadcastable
593
593
/// by our counterparty, ie the amount of time that they have to wait to recover their funds
594
594
/// if they broadcast a transaction.
595
- /// Will panic if ready_channel wasn't called.
595
+ /// Will panic if provide_channel_parameters wasn't called.
596
596
pub fn holder_selected_contest_delay ( & self ) -> u16 { self . get_channel_parameters ( ) . holder_selected_contest_delay }
597
597
598
598
/// Whether the holder is the initiator
599
- /// Will panic if ready_channel wasn't called.
599
+ /// Will panic if provide_channel_parameters wasn't called.
600
600
pub fn is_outbound ( & self ) -> bool { self . get_channel_parameters ( ) . is_outbound_from_holder }
601
601
602
602
/// Funding outpoint
603
- /// Will panic if ready_channel wasn't called.
603
+ /// Will panic if provide_channel_parameters wasn't called.
604
604
pub fn funding_outpoint ( & self ) -> & OutPoint { self . get_channel_parameters ( ) . funding_outpoint . as_ref ( ) . unwrap ( ) }
605
605
606
606
/// Obtain a ChannelTransactionParameters for this channel, to be used when verifying or
607
607
/// building transactions.
608
608
///
609
- /// Will panic if ready_channel wasn't called.
609
+ /// Will panic if provide_channel_parameters wasn't called.
610
610
pub fn get_channel_parameters ( & self ) -> & ChannelTransactionParameters {
611
611
self . channel_parameters . as_ref ( ) . unwrap ( )
612
612
}
613
613
614
614
/// Whether anchors should be used.
615
- /// Will panic if ready_channel wasn't called.
615
+ /// Will panic if provide_channel_parameters wasn't called.
616
616
pub fn opt_anchors ( & self ) -> bool {
617
617
self . get_channel_parameters ( ) . opt_anchors . is_some ( )
618
618
}
@@ -816,7 +816,7 @@ impl BaseSign for InMemorySigner {
816
816
Ok ( ( sign ( secp_ctx, & msghash, & self . node_secret ) , sign ( secp_ctx, & msghash, & self . funding_key ) ) )
817
817
}
818
818
819
- fn ready_channel ( & mut self , channel_parameters : & ChannelTransactionParameters ) {
819
+ fn provide_channel_parameters ( & mut self , channel_parameters : & ChannelTransactionParameters ) {
820
820
assert ! ( self . channel_parameters. is_none( ) , "Acceptance already noted" ) ;
821
821
assert ! ( channel_parameters. is_populated( ) , "Channel parameters must be fully populated" ) ;
822
822
self . channel_parameters = Some ( channel_parameters. clone ( ) ) ;
0 commit comments