Skip to content

Commit 08edfa7

Browse files
committed
Support scalar tweak to rotate holder funding key during splicing
A scalar tweak applied to the base funding key to obtain the channel's funding key used in the 2-of-2 multisig. This is used to derive additional keys from the same secret backing the base `funding_pubkey`, as we have to rotate keys for each successful splice attempt. The tweak is computed similar to existing tweaks used in [BOLT-3](https://github.com/lightning/bolts/blob/master/03-transactions.md#key-derivation), but rather than using the `per_commitment_point`, we use the txid of the funding transaction the splice transaction is spending to guarantee uniqueness, and the `revocation_basepoint` to guarantee only the channel participants can re-derive the new funding key. tweak = SHA256(splice_parent_funding_txid || revocation_basepoint || base_funding_pubkey) tweaked_funding_key = base_funding_key + tweak
1 parent 36ba27a commit 08edfa7

File tree

9 files changed

+267
-61
lines changed

9 files changed

+267
-61
lines changed

lightning/src/chain/channelmonitor.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -3461,7 +3461,7 @@ impl<Signer: EcdsaChannelSigner> ChannelMonitorImpl<Signer> {
34613461
let broadcaster_keys = &self.onchain_tx_handler.channel_transaction_parameters
34623462
.counterparty_parameters.as_ref().unwrap().pubkeys;
34633463
let countersignatory_keys =
3464-
&self.onchain_tx_handler.channel_transaction_parameters.holder_pubkeys;
3464+
self.onchain_tx_handler.channel_transaction_parameters.holder_pubkeys.as_ref();
34653465

34663466
let broadcaster_funding_key = broadcaster_keys.funding_pubkey;
34673467
let countersignatory_funding_key = countersignatory_keys.funding_pubkey;
@@ -5136,7 +5136,7 @@ impl<'a, 'b, ES: EntropySource, SP: SignerProvider> ReadableArgs<(&'a ES, &'b SP
51365136
if onchain_tx_handler.channel_type_features().supports_anchors_zero_fee_htlc_tx() &&
51375137
counterparty_payment_script.is_p2wpkh()
51385138
{
5139-
let payment_point = onchain_tx_handler.channel_transaction_parameters.holder_pubkeys.payment_point;
5139+
let payment_point = onchain_tx_handler.channel_transaction_parameters.holder_pubkeys.as_ref().payment_point;
51405140
counterparty_payment_script =
51415141
chan_utils::get_to_countersignatory_with_anchors_redeemscript(&payment_point).to_p2wsh();
51425142
}
@@ -5235,7 +5235,7 @@ mod tests {
52355235
use crate::ln::types::ChannelId;
52365236
use crate::types::payment::{PaymentPreimage, PaymentHash};
52375237
use crate::ln::channel_keys::{DelayedPaymentBasepoint, DelayedPaymentKey, HtlcBasepoint, RevocationBasepoint, RevocationKey};
5238-
use crate::ln::chan_utils::{self,HTLCOutputInCommitment, ChannelPublicKeys, ChannelTransactionParameters, HolderCommitmentTransaction, CounterpartyChannelTransactionParameters};
5238+
use crate::ln::chan_utils::{self,HTLCOutputInCommitment, ChannelPublicKeys, ChannelTransactionParameters, HolderChannelPublicKeys, HolderCommitmentTransaction, CounterpartyChannelTransactionParameters};
52395239
use crate::ln::channelmanager::{PaymentId, RecipientOnionFields};
52405240
use crate::ln::functional_test_utils::*;
52415241
use crate::ln::script::ShutdownScript;
@@ -5415,7 +5415,7 @@ mod tests {
54155415
let funding_outpoint = OutPoint { txid: Txid::all_zeros(), index: u16::MAX };
54165416
let channel_id = ChannelId::v1_from_funding_outpoint(funding_outpoint);
54175417
let channel_parameters = ChannelTransactionParameters {
5418-
holder_pubkeys: keys.holder_channel_pubkeys.clone(),
5418+
holder_pubkeys: HolderChannelPublicKeys::from(keys.holder_channel_pubkeys.clone()),
54195419
holder_selected_contest_delay: 66,
54205420
is_outbound_from_holder: true,
54215421
counterparty_parameters: Some(CounterpartyChannelTransactionParameters {
@@ -5667,7 +5667,7 @@ mod tests {
56675667
let funding_outpoint = OutPoint { txid: Txid::all_zeros(), index: u16::MAX };
56685668
let channel_id = ChannelId::v1_from_funding_outpoint(funding_outpoint);
56695669
let channel_parameters = ChannelTransactionParameters {
5670-
holder_pubkeys: keys.holder_channel_pubkeys.clone(),
5670+
holder_pubkeys: HolderChannelPublicKeys::from(keys.holder_channel_pubkeys.clone()),
56715671
holder_selected_contest_delay: 66,
56725672
is_outbound_from_holder: true,
56735673
counterparty_parameters: Some(CounterpartyChannelTransactionParameters {

lightning/src/chain/onchaintx.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -665,7 +665,8 @@ impl<ChannelSigner: EcdsaChannelSigner> OnchainTxHandler<ChannelSigner> {
665665
}
666666

667667
// We'll locate an anchor output we can spend within the commitment transaction.
668-
let funding_pubkey = &self.channel_transaction_parameters.holder_pubkeys.funding_pubkey;
668+
let funding_pubkey =
669+
&self.channel_transaction_parameters.holder_pubkeys.as_ref().funding_pubkey;
669670
match chan_utils::get_anchor_output(&tx.0, funding_pubkey) {
670671
// An anchor output was found, so we should yield a funding event externally.
671672
Some((idx, _)) => {
@@ -1290,7 +1291,7 @@ mod tests {
12901291
use crate::chain::transaction::OutPoint;
12911292
use crate::ln::chan_utils::{
12921293
ChannelPublicKeys, ChannelTransactionParameters, CounterpartyChannelTransactionParameters,
1293-
HTLCOutputInCommitment, HolderCommitmentTransaction,
1294+
HTLCOutputInCommitment, HolderChannelPublicKeys, HolderCommitmentTransaction,
12941295
};
12951296
use crate::ln::channel_keys::{DelayedPaymentBasepoint, HtlcBasepoint, RevocationBasepoint};
12961297
use crate::ln::functional_test_utils::create_dummy_block;
@@ -1344,7 +1345,7 @@ mod tests {
13441345
// Use non-anchor channels so that HTLC-Timeouts are broadcast immediately instead of sent
13451346
// to the user for external funding.
13461347
let chan_params = ChannelTransactionParameters {
1347-
holder_pubkeys: signer.holder_channel_pubkeys.clone(),
1348+
holder_pubkeys: HolderChannelPublicKeys::from(signer.holder_channel_pubkeys.clone()),
13481349
holder_selected_contest_delay: 66,
13491350
is_outbound_from_holder: true,
13501351
counterparty_parameters: Some(CounterpartyChannelTransactionParameters {

lightning/src/ln/chan_utils.rs

+145-9
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ use crate::util::transaction_utils;
3535

3636
use bitcoin::locktime::absolute::LockTime;
3737
use bitcoin::ecdsa::Signature as BitcoinSignature;
38-
use bitcoin::secp256k1::{SecretKey, PublicKey, Scalar};
38+
use bitcoin::secp256k1::{SecretKey, PublicKey, Scalar, Verification};
3939
use bitcoin::secp256k1::{Secp256k1, ecdsa::Signature, Message};
4040
use bitcoin::{secp256k1, Sequence, Witness};
4141

@@ -430,6 +430,26 @@ pub fn derive_private_revocation_key<T: secp256k1::Signing>(secp_ctx: &Secp256k1
430430
.expect("Addition only fails if the tweak is the inverse of the key. This is not possible when the tweak commits to the key.")
431431
}
432432

433+
/// Computes the tweak to apply to the base funding key of a channel.
434+
///
435+
/// The tweak is computed similar to existing tweaks used in
436+
/// [BOLT-3](https://github.com/lightning/bolts/blob/master/03-transactions.md#key-derivation), but
437+
/// rather than using the `per_commitment_point`, we use the txid of the funding transaction the
438+
/// splice transaction is spending to guarantee uniqueness, and the `revocation_basepoint` to
439+
/// guarantee only the channel participants can re-derive the new funding key.
440+
///
441+
/// tweak = SHA256(splice_parent_funding_txid || revocation_basepoint || base_funding_pubkey)
442+
/// tweaked_funding_key = base_funding_key + tweak
443+
//
444+
// TODO: Expose a helper on `FundingScope` that calls this.
445+
pub fn compute_funding_key_tweak(base_funding_pubkey: &PublicKey, revocation_basepoint: &PublicKey, splice_parent_funding_txid: &Txid) -> Scalar {
446+
let mut sha = Sha256::engine();
447+
sha.input(splice_parent_funding_txid.as_byte_array());
448+
sha.input(&revocation_basepoint.serialize());
449+
sha.input(&base_funding_pubkey.serialize());
450+
Scalar::from_be_bytes(Sha256::from_engine(sha).to_byte_array()).unwrap()
451+
}
452+
433453
/// The set of public keys which are used in the creation of one commitment transaction.
434454
/// These are derived from the channel base keys and per-commitment data.
435455
///
@@ -470,6 +490,9 @@ impl_writeable_tlv_based!(TxCreationKeys, {
470490
pub struct ChannelPublicKeys {
471491
/// The public key which is used to sign all commitment transactions, as it appears in the
472492
/// on-chain channel lock-in 2-of-2 multisig output.
493+
///
494+
/// NOTE: This key will already have the [`HolderChannelPublicKeys::funding_key_tweak`] applied
495+
/// if one existed.
473496
pub funding_pubkey: PublicKey,
474497
/// The base point which is used (with [`RevocationKey::from_basepoint`]) to derive per-commitment
475498
/// revocation keys. This is combined with the per-commitment-secret generated by the
@@ -497,6 +520,113 @@ impl_writeable_tlv_based!(ChannelPublicKeys, {
497520
(8, htlc_basepoint, required),
498521
});
499522

523+
/// The holder's public keys which do not change over the life of a channel, except for the
524+
/// `funding_pubkey`, which may rotate after each successful splice attempt via the
525+
/// `funding_key_tweak`.
526+
#[derive(Clone, Debug, Hash, PartialEq, Eq)]
527+
pub struct HolderChannelPublicKeys {
528+
keys: ChannelPublicKeys,
529+
/// A optional scalar tweak applied to the base funding key to obtain the channel's funding key
530+
/// used in the 2-of-2 multisig. This is used to derive additional keys from the same secret
531+
/// backing the base `funding_pubkey`, as we have to rotate keys for each successful splice
532+
/// attempt. The tweak is computed as described in [`compute_funding_key_tweak`].
533+
//
534+
// TODO: Expose `splice_parent_funding_txid` instead so the signer can re-derive the tweak?
535+
// There's no harm in the signer trusting the tweak as long as its funding secret has not
536+
// been leaked.
537+
pub funding_key_tweak: Option<Scalar>,
538+
}
539+
540+
// `HolderChannelPublicKeys` may have been previously written as `ChannelPublicKeys` so we have to
541+
// mimic its serialization.
542+
impl Writeable for HolderChannelPublicKeys {
543+
fn write<W: Writer>(&self, writer: &mut W) -> Result<(), io::Error> {
544+
write_tlv_fields!(writer, {
545+
(0, self.keys.funding_pubkey, required),
546+
(2, self.keys.revocation_basepoint, required),
547+
(4, self.keys.payment_point, required),
548+
(6, self.keys.delayed_payment_basepoint, required),
549+
(8, self.keys.htlc_basepoint, required),
550+
(10, self.funding_key_tweak, option),
551+
});
552+
Ok(())
553+
}
554+
}
555+
556+
impl Readable for HolderChannelPublicKeys {
557+
fn read<R: io::Read>(reader: &mut R) -> Result<Self, DecodeError> {
558+
let mut funding_pubkey = RequiredWrapper(None);
559+
let mut revocation_basepoint = RequiredWrapper(None);
560+
let mut payment_point = RequiredWrapper(None);
561+
let mut delayed_payment_basepoint = RequiredWrapper(None);
562+
let mut htlc_basepoint = RequiredWrapper(None);
563+
let mut funding_key_tweak: Option<Scalar> = None;
564+
565+
read_tlv_fields!(reader, {
566+
(0, funding_pubkey, required),
567+
(2, revocation_basepoint, required),
568+
(4, payment_point, required),
569+
(6, delayed_payment_basepoint, required),
570+
(8, htlc_basepoint, required),
571+
(10, funding_key_tweak, option),
572+
});
573+
574+
Ok(Self {
575+
keys: ChannelPublicKeys {
576+
funding_pubkey: funding_pubkey.0.unwrap(),
577+
revocation_basepoint: revocation_basepoint.0.unwrap(),
578+
payment_point: payment_point.0.unwrap(),
579+
delayed_payment_basepoint: delayed_payment_basepoint.0.unwrap(),
580+
htlc_basepoint: htlc_basepoint.0.unwrap(),
581+
},
582+
funding_key_tweak,
583+
})
584+
}
585+
}
586+
587+
impl AsRef<ChannelPublicKeys> for HolderChannelPublicKeys {
588+
fn as_ref(&self) -> &ChannelPublicKeys {
589+
&self.keys
590+
}
591+
}
592+
593+
impl From<ChannelPublicKeys> for HolderChannelPublicKeys {
594+
fn from(value: ChannelPublicKeys) -> Self {
595+
Self {
596+
keys: value,
597+
funding_key_tweak: None,
598+
}
599+
}
600+
}
601+
602+
impl HolderChannelPublicKeys {
603+
/// Constructs a new instance of [`HolderChannelPublicKeys`].
604+
pub fn new<C: Verification>(
605+
funding_pubkey: PublicKey, revocation_basepoint: RevocationBasepoint,
606+
payment_point: PublicKey, delayed_payment_basepoint: DelayedPaymentBasepoint,
607+
htlc_basepoint: HtlcBasepoint, funding_key_tweak: Option<Scalar>, secp: &Secp256k1<C>,
608+
) -> Self {
609+
let funding_pubkey = funding_key_tweak
610+
.map(|tweak| {
611+
funding_pubkey
612+
.add_exp_tweak(secp, &tweak)
613+
.expect("Addition only fails if the tweak is the inverse of the key")
614+
})
615+
.unwrap_or(funding_pubkey);
616+
617+
Self {
618+
keys: ChannelPublicKeys {
619+
funding_pubkey,
620+
revocation_basepoint,
621+
payment_point,
622+
delayed_payment_basepoint,
623+
htlc_basepoint,
624+
},
625+
funding_key_tweak,
626+
}
627+
}
628+
}
629+
500630
impl TxCreationKeys {
501631
/// Create per-state keys from channel base points and the per-commitment point.
502632
/// Key set is asymmetric and can't be used as part of counter-signatory set of transactions.
@@ -869,7 +999,7 @@ pub fn build_anchor_input_witness(funding_key: &PublicKey, funding_sig: &Signatu
869999
#[derive(Clone, Debug, Hash, PartialEq, Eq)]
8701000
pub struct ChannelTransactionParameters {
8711001
/// Holder public keys
872-
pub holder_pubkeys: ChannelPublicKeys,
1002+
pub holder_pubkeys: HolderChannelPublicKeys,
8731003
/// The contest delay selected by the holder, which applies to counterparty-broadcast transactions
8741004
pub holder_selected_contest_delay: u16,
8751005
/// Whether the holder is the initiator of this channel.
@@ -933,7 +1063,7 @@ impl ChannelTransactionParameters {
9331063

9341064
pub(crate) fn make_funding_redeemscript(&self) -> ScriptBuf {
9351065
make_funding_redeemscript(
936-
&self.holder_pubkeys.funding_pubkey,
1066+
&self.holder_pubkeys.as_ref().funding_pubkey,
9371067
&self.counterparty_parameters.as_ref().unwrap().pubkeys.funding_pubkey
9381068
)
9391069
}
@@ -953,7 +1083,10 @@ impl ChannelTransactionParameters {
9531083
htlc_basepoint: PublicKey::from_slice(&[2; 33]).unwrap().into(),
9541084
};
9551085
Self {
956-
holder_pubkeys: dummy_keys.clone(),
1086+
holder_pubkeys: HolderChannelPublicKeys {
1087+
keys: dummy_keys.clone(),
1088+
funding_key_tweak: None,
1089+
},
9571090
holder_selected_contest_delay: 42,
9581091
is_outbound_from_holder: true,
9591092
counterparty_parameters: Some(CounterpartyChannelTransactionParameters {
@@ -1050,7 +1183,7 @@ impl<'a> DirectedChannelTransactionParameters<'a> {
10501183
/// Get the channel pubkeys for the broadcaster
10511184
pub fn broadcaster_pubkeys(&self) -> &'a ChannelPublicKeys {
10521185
if self.holder_is_broadcaster {
1053-
&self.inner.holder_pubkeys
1186+
self.inner.holder_pubkeys.as_ref()
10541187
} else {
10551188
&self.inner.counterparty_parameters.as_ref().unwrap().pubkeys
10561189
}
@@ -1061,7 +1194,7 @@ impl<'a> DirectedChannelTransactionParameters<'a> {
10611194
if self.holder_is_broadcaster {
10621195
&self.inner.counterparty_parameters.as_ref().unwrap().pubkeys
10631196
} else {
1064-
&self.inner.holder_pubkeys
1197+
self.inner.holder_pubkeys.as_ref()
10651198
}
10661199
}
10671200

@@ -1149,7 +1282,10 @@ impl HolderCommitmentTransaction {
11491282
htlc_basepoint: HtlcBasepoint::from(dummy_key.clone())
11501283
};
11511284
let channel_parameters = ChannelTransactionParameters {
1152-
holder_pubkeys: channel_pubkeys.clone(),
1285+
holder_pubkeys: HolderChannelPublicKeys {
1286+
keys: channel_pubkeys.clone(),
1287+
funding_key_tweak: None,
1288+
},
11531289
holder_selected_contest_delay: 0,
11541290
is_outbound_from_holder: false,
11551291
counterparty_parameters: Some(CounterpartyChannelTransactionParameters { pubkeys: channel_pubkeys.clone(), selected_contest_delay: 0 }),
@@ -1918,7 +2054,7 @@ pub fn get_commitment_transaction_number_obscure_factor(
19182054

19192055
#[cfg(test)]
19202056
mod tests {
1921-
use super::{CounterpartyCommitmentSecrets, ChannelPublicKeys};
2057+
use super::{CounterpartyCommitmentSecrets, ChannelPublicKeys, HolderChannelPublicKeys};
19222058
use crate::chain;
19232059
use crate::ln::chan_utils::{get_htlc_redeemscript, get_to_countersignatory_with_anchors_redeemscript, CommitmentTransaction, TxCreationKeys, ChannelTransactionParameters, CounterpartyChannelTransactionParameters, HTLCOutputInCommitment};
19242060
use bitcoin::secp256k1::{PublicKey, SecretKey, Secp256k1};
@@ -1961,7 +2097,7 @@ mod tests {
19612097
let counterparty_pubkeys = counterparty_signer.pubkeys().clone();
19622098
let keys = TxCreationKeys::derive_new(&secp_ctx, &per_commitment_point, delayed_payment_base, htlc_basepoint, &counterparty_pubkeys.revocation_basepoint, &counterparty_pubkeys.htlc_basepoint);
19632099
let channel_parameters = ChannelTransactionParameters {
1964-
holder_pubkeys: holder_pubkeys.clone(),
2100+
holder_pubkeys: HolderChannelPublicKeys::from(holder_pubkeys.clone()),
19652101
holder_selected_contest_delay: 0,
19662102
is_outbound_from_holder: false,
19672103
counterparty_parameters: Some(CounterpartyChannelTransactionParameters { pubkeys: counterparty_pubkeys.clone(), selected_contest_delay: 0 }),

lightning/src/ln/channel.rs

+15-8
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ use crate::ln::channel_state::{ChannelShutdownState, CounterpartyForwardingInfo,
4242
use crate::ln::channelmanager::{self, OpenChannelMessage, PendingHTLCStatus, HTLCSource, SentHTLCId, HTLCFailureMsg, PendingHTLCInfo, RAACommitmentOrder, PaymentClaimDetails, BREAKDOWN_TIMEOUT, MIN_CLTV_EXPIRY_DELTA, MAX_LOCAL_BREAKDOWN_TIMEOUT};
4343
use crate::ln::chan_utils::{
4444
CounterpartyCommitmentSecrets, TxCreationKeys, HTLCOutputInCommitment, htlc_success_tx_weight,
45-
htlc_timeout_tx_weight, ChannelPublicKeys, CommitmentTransaction,
45+
htlc_timeout_tx_weight, ChannelPublicKeys, HolderChannelPublicKeys, CommitmentTransaction,
4646
HolderCommitmentTransaction, ChannelTransactionParameters,
4747
CounterpartyChannelTransactionParameters, MAX_HTLCS,
4848
get_commitment_transaction_number_obscure_factor,
@@ -1694,7 +1694,7 @@ impl FundingScope {
16941694
}
16951695

16961696
fn get_holder_pubkeys(&self) -> &ChannelPublicKeys {
1697-
&self.channel_transaction_parameters.holder_pubkeys
1697+
self.channel_transaction_parameters.holder_pubkeys.as_ref()
16981698
}
16991699

17001700
pub fn get_counterparty_selected_contest_delay(&self) -> Option<u16> {
@@ -2586,7 +2586,7 @@ impl<SP: Deref> ChannelContext<SP> where SP::Target: SignerProvider {
25862586
next_remote_commitment_tx_fee_info_cached: Mutex::new(None),
25872587

25882588
channel_transaction_parameters: ChannelTransactionParameters {
2589-
holder_pubkeys: pubkeys,
2589+
holder_pubkeys: HolderChannelPublicKeys::from(pubkeys),
25902590
holder_selected_contest_delay: config.channel_handshake_config.our_to_self_delay,
25912591
is_outbound_from_holder: false,
25922592
counterparty_parameters: Some(CounterpartyChannelTransactionParameters {
@@ -2823,7 +2823,7 @@ impl<SP: Deref> ChannelContext<SP> where SP::Target: SignerProvider {
28232823
next_remote_commitment_tx_fee_info_cached: Mutex::new(None),
28242824

28252825
channel_transaction_parameters: ChannelTransactionParameters {
2826-
holder_pubkeys: pubkeys,
2826+
holder_pubkeys: HolderChannelPublicKeys::from(pubkeys),
28272827
holder_selected_contest_delay: config.channel_handshake_config.our_to_self_delay,
28282828
is_outbound_from_holder: true,
28292829
counterparty_parameters: None,
@@ -8160,7 +8160,11 @@ impl<SP: Deref> FundedChannel<SP> where
81608160
};
81618161
match &self.context.holder_signer {
81628162
ChannelSignerType::Ecdsa(ecdsa) => {
8163-
let our_bitcoin_sig = match ecdsa.sign_channel_announcement_with_funding_key(&announcement, &self.context.secp_ctx) {
8163+
let funding_key_tweak =
8164+
self.funding.channel_transaction_parameters.holder_pubkeys.funding_key_tweak;
8165+
let our_bitcoin_sig = match ecdsa.sign_channel_announcement_with_funding_key(
8166+
&announcement, funding_key_tweak, &self.context.secp_ctx,
8167+
) {
81648168
Err(_) => {
81658169
log_error!(logger, "Signer rejected channel_announcement signing. Channel will not be announced!");
81668170
return None;
@@ -8201,8 +8205,11 @@ impl<SP: Deref> FundedChannel<SP> where
82018205
.map_err(|_| ChannelError::Ignore("Failed to generate node signature for channel_announcement".to_owned()))?;
82028206
match &self.context.holder_signer {
82038207
ChannelSignerType::Ecdsa(ecdsa) => {
8204-
let our_bitcoin_sig = ecdsa.sign_channel_announcement_with_funding_key(&announcement, &self.context.secp_ctx)
8205-
.map_err(|_| ChannelError::Ignore("Signer rejected channel_announcement".to_owned()))?;
8208+
let funding_key_tweak =
8209+
self.funding.channel_transaction_parameters.holder_pubkeys.funding_key_tweak;
8210+
let our_bitcoin_sig = ecdsa.sign_channel_announcement_with_funding_key(
8211+
&announcement, funding_key_tweak, &self.context.secp_ctx,
8212+
).map_err(|_| ChannelError::Ignore("Signer rejected channel_announcement".to_owned()))?;
82068213
Ok(msgs::ChannelAnnouncement {
82078214
node_signature_1: if were_node_one { our_node_sig } else { their_node_sig },
82088215
node_signature_2: if were_node_one { their_node_sig } else { our_node_sig },
@@ -10738,7 +10745,7 @@ impl<'a, 'b, 'c, ES: Deref, SP: Deref> ReadableArgs<(&'a ES, &'b SP, u32, &'c Ch
1073810745
},
1073910746
};
1074010747
let is_v2_established = channel_id.is_v2_channel_id(
10741-
&channel_parameters.holder_pubkeys.revocation_basepoint,
10748+
&channel_parameters.holder_pubkeys.as_ref().revocation_basepoint,
1074210749
&channel_parameters.counterparty_parameters.as_ref()
1074310750
.expect("Persisted channel must have counterparty parameters").pubkeys.revocation_basepoint);
1074410751

0 commit comments

Comments
 (0)