@@ -41,7 +41,7 @@ use crate::chain::transaction::OutPoint;
4141use crate :: crypto:: utils:: { hkdf_extract_expand_twice, sign, sign_with_aux_rand} ;
4242use crate :: ln:: chan_utils;
4343use crate :: ln:: chan_utils:: {
44- get_counterparty_payment_script , get_revokeable_redeemscript, make_funding_redeemscript,
44+ get_countersigner_payment_script , get_revokeable_redeemscript, make_funding_redeemscript,
4545 ChannelPublicKeys , ChannelTransactionParameters , ClosingTransaction , CommitmentTransaction ,
4646 HTLCOutputInCommitment , HolderCommitmentTransaction ,
4747} ;
@@ -1295,8 +1295,8 @@ impl InMemorySigner {
12951295
12961296 let payment_point_v1 = PublicKey :: from_secret_key ( secp_ctx, & self . payment_key_v1 ) ;
12971297 let payment_point_v2 = PublicKey :: from_secret_key ( secp_ctx, & self . payment_key_v2 ) ;
1298- let spk_v1 = get_counterparty_payment_script ( channel_type_features, & payment_point_v1) ;
1299- let spk_v2 = get_counterparty_payment_script ( channel_type_features, & payment_point_v2) ;
1298+ let spk_v1 = get_countersigner_payment_script ( channel_type_features, & payment_point_v1) ;
1299+ let spk_v2 = get_countersigner_payment_script ( channel_type_features, & payment_point_v2) ;
13001300
13011301 let ( remotepubkey, payment_key) = if spk_v1 == descriptor. output . script_pubkey {
13021302 ( bitcoin:: PublicKey :: new ( payment_point_v1) , & self . payment_key_v1 )
@@ -2075,7 +2075,12 @@ impl KeysManager {
20752075 }
20762076
20772077 /// Gets the set of possible `script_pubkey`s which can appear on chain for our
2078- /// non-HTLC-encumbered balance if our counterparty force-closes the channel.
2078+ /// non-HTLC-encumbered balance if our counterparty force-closes a channel.
2079+ ///
2080+ /// If you've lost all data except your seed, asking your peers nicely to force-close the
2081+ /// chanels they had with you (and hoping they don't broadcast a stale state and that there are
2082+ /// no pending HTLCs in the latest state) and scanning the chain for these `script_pubkey`s can
2083+ /// allow you to recover (some of) your funds.
20792084 ///
20802085 /// Only channels opened when using a [`KeysManager`] with the `v2_remote_key_derivation`
20812086 /// argument to [`KeysManager::new`] set, or any spliced channels will close to such scripts,
@@ -2097,8 +2102,8 @@ impl KeysManager {
20972102 . expect ( "Your RNG is busted" )
20982103 . private_key ;
20992104 let pubkey = PublicKey :: from_secret_key ( secp_ctx, & key) ;
2100- res. push ( get_counterparty_payment_script ( & static_remote_key_features, & pubkey) ) ;
2101- res. push ( get_counterparty_payment_script ( & zero_fee_htlc_features, & pubkey) ) ;
2105+ res. push ( get_countersigner_payment_script ( & static_remote_key_features, & pubkey) ) ;
2106+ res. push ( get_countersigner_payment_script ( & zero_fee_htlc_features, & pubkey) ) ;
21022107 }
21032108 res
21042109 }
0 commit comments