Skip to content

Commit 7301a64

Browse files
committed
nits
1 parent 192a393 commit 7301a64

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

lightning/src/ln/chan_utils.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ pub struct ChannelPublicKeys {
150150
pub htlc_basepoint: PublicKey,
151151
}
152152

153-
impl_writeable!(ChannelPublicKeys, 0, {
153+
impl_writeable!(ChannelPublicKeys, 33*5, {
154154
funding_pubkey,
155155
revocation_basepoint,
156156
payment_basepoint,

lightning/src/ln/channel.rs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -539,14 +539,14 @@ impl<ChanSigner: ChannelKeys> Channel<ChanSigner> {
539539
/// Assumes chain_hash has already been checked and corresponds with what we expect!
540540
pub fn new_from_req(fee_estimator: &FeeEstimator, keys_provider: &Arc<KeysInterface<ChanKeySigner = ChanSigner>>, their_node_id: PublicKey, their_features: InitFeatures, msg: &msgs::OpenChannel, user_id: u64, logger: Arc<Logger>, config: &UserConfig) -> Result<Channel<ChanSigner>, ChannelError> {
541541
let mut chan_keys = keys_provider.get_channel_keys(true);
542-
let channel_pubkeys = ChannelPublicKeys {
542+
let their_pubkeys = ChannelPublicKeys {
543543
funding_pubkey: msg.funding_pubkey,
544544
revocation_basepoint: msg.revocation_basepoint,
545545
payment_basepoint: msg.payment_basepoint,
546546
delayed_payment_basepoint: msg.delayed_payment_basepoint,
547547
htlc_basepoint: msg.htlc_basepoint
548548
};
549-
chan_keys.set_remote_channel_pubkeys(&channel_pubkeys);
549+
chan_keys.set_remote_channel_pubkeys(&their_pubkeys);
550550
let mut local_config = (*config).channel_options.clone();
551551

552552
if config.own_channel_config.our_to_self_delay < BREAKDOWN_TIMEOUT {
@@ -728,13 +728,7 @@ impl<ChanSigner: ChannelKeys> Channel<ChanSigner> {
728728
their_max_accepted_htlcs: msg.max_accepted_htlcs,
729729
minimum_depth: config.own_channel_config.minimum_depth,
730730

731-
their_pubkeys: Some(ChannelPublicKeys {
732-
funding_pubkey: msg.funding_pubkey,
733-
revocation_basepoint: msg.revocation_basepoint,
734-
payment_basepoint: msg.payment_basepoint,
735-
delayed_payment_basepoint: msg.delayed_payment_basepoint,
736-
htlc_basepoint: msg.htlc_basepoint,
737-
}),
731+
their_pubkeys: Some(their_pubkeys),
738732
their_cur_commitment_point: Some(msg.first_per_commitment_point),
739733

740734
their_prev_commitment_point: None,

0 commit comments

Comments
 (0)