@@ -41,7 +41,7 @@ use crate::chain::transaction::OutPoint;
41
41
use crate :: crypto:: utils:: { hkdf_extract_expand_twice, sign, sign_with_aux_rand} ;
42
42
use crate :: ln:: chan_utils;
43
43
use 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,
45
45
ChannelPublicKeys , ChannelTransactionParameters , ClosingTransaction , CommitmentTransaction ,
46
46
HTLCOutputInCommitment , HolderCommitmentTransaction ,
47
47
} ;
@@ -1295,8 +1295,8 @@ impl InMemorySigner {
1295
1295
1296
1296
let payment_point_v1 = PublicKey :: from_secret_key ( secp_ctx, & self . payment_key_v1 ) ;
1297
1297
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) ;
1300
1300
1301
1301
let ( remotepubkey, payment_key) = if spk_v1 == descriptor. output . script_pubkey {
1302
1302
( bitcoin:: PublicKey :: new ( payment_point_v1) , & self . payment_key_v1 )
@@ -2075,7 +2075,12 @@ impl KeysManager {
2075
2075
}
2076
2076
2077
2077
/// 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.
2079
2084
///
2080
2085
/// Only channels opened when using a [`KeysManager`] with the `v2_remote_key_derivation`
2081
2086
/// argument to [`KeysManager::new`] set, or any spliced channels will close to such scripts,
@@ -2097,8 +2102,8 @@ impl KeysManager {
2097
2102
. expect ( "Your RNG is busted" )
2098
2103
. private_key ;
2099
2104
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) ) ;
2102
2107
}
2103
2108
res
2104
2109
}
0 commit comments