Skip to content

Commit 5b71723

Browse files
committed
Require counterparty_node_id TLV for ChannelMonitor
New `ChannelMonitor`s created starting from v0.0.110 will already have this field set, and those created before then will have it set if a `ChannelMonitorUpdate` created in v0.0.116 or later has been applied. It would be extremely rare for a user to not fall under either of these conditions: they opened a channel almost 3 years ago, and haven't had any activity on it in the last 2 years. Nonetheless, a panic has been added on `ChannelMonitor` deserialization to ensure users can move forward by first running a v0.1.* release and sending/routing a payment or closing the channel before upgrading to v0.2.0.
1 parent 5bc9ffa commit 5b71723

File tree

7 files changed

+94
-129
lines changed

7 files changed

+94
-129
lines changed

fuzz/src/chanmon_consistency.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ impl chain::Watch<TestChannelSigner> for TestChainMonitor {
282282

283283
fn release_pending_monitor_events(
284284
&self,
285-
) -> Vec<(OutPoint, ChannelId, Vec<MonitorEvent>, Option<PublicKey>)> {
285+
) -> Vec<(OutPoint, ChannelId, Vec<MonitorEvent>, PublicKey)> {
286286
return self.chain_monitor.release_pending_monitor_events();
287287
}
288288
}

lightning/src/chain/chainmonitor.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ pub struct ChainMonitor<ChannelSigner: EcdsaChannelSigner, C: Deref, T: Deref, F
246246
persister: P,
247247
/// "User-provided" (ie persistence-completion/-failed) [`MonitorEvent`]s. These came directly
248248
/// from the user and not from a [`ChannelMonitor`].
249-
pending_monitor_events: Mutex<Vec<(OutPoint, ChannelId, Vec<MonitorEvent>, Option<PublicKey>)>>,
249+
pending_monitor_events: Mutex<Vec<(OutPoint, ChannelId, Vec<MonitorEvent>, PublicKey)>>,
250250
/// The best block height seen, used as a proxy for the passage of time.
251251
highest_chain_height: AtomicUsize,
252252

@@ -874,7 +874,7 @@ where C::Target: chain::Filter,
874874
}
875875
}
876876

877-
fn release_pending_monitor_events(&self) -> Vec<(OutPoint, ChannelId, Vec<MonitorEvent>, Option<PublicKey>)> {
877+
fn release_pending_monitor_events(&self) -> Vec<(OutPoint, ChannelId, Vec<MonitorEvent>, PublicKey)> {
878878
let mut pending_monitor_events = self.pending_monitor_events.lock().unwrap().split_off(0);
879879
for monitor_state in self.monitors.read().unwrap().values() {
880880
let monitor_events = monitor_state.monitor.get_and_clear_pending_monitor_events();

lightning/src/chain/channelmonitor.rs

Lines changed: 18 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1015,7 +1015,7 @@ pub(crate) struct ChannelMonitorImpl<Signer: EcdsaChannelSigner> {
10151015
best_block: BestBlock,
10161016

10171017
/// The node_id of our counterparty
1018-
counterparty_node_id: Option<PublicKey>,
1018+
counterparty_node_id: PublicKey,
10191019

10201020
/// Initial counterparty commmitment data needed to recreate the commitment tx
10211021
/// in the persistence pipeline for third-party watchtowers. This will only be present on
@@ -1237,7 +1237,7 @@ impl<Signer: EcdsaChannelSigner> Writeable for ChannelMonitorImpl<Signer> {
12371237
(3, self.htlcs_resolved_on_chain, required_vec),
12381238
(5, pending_monitor_events, required_vec),
12391239
(7, self.funding_spend_seen, required),
1240-
(9, self.counterparty_node_id, option),
1240+
(9, self.counterparty_node_id, required),
12411241
(11, self.confirmed_commitment_tx_counterparty_output, option),
12421242
(13, self.spendable_txids_confirmed, required_vec),
12431243
(15, self.counterparty_fulfilled_htlcs, required),
@@ -1333,7 +1333,7 @@ impl<'a, L: Deref> WithChannelMonitor<'a, L> where L::Target: Logger {
13331333
}
13341334

13351335
pub(crate) fn from_impl<S: EcdsaChannelSigner>(logger: &'a L, monitor_impl: &ChannelMonitorImpl<S>, payment_hash: Option<PaymentHash>) -> Self {
1336-
let peer_id = monitor_impl.counterparty_node_id;
1336+
let peer_id = Some(monitor_impl.counterparty_node_id);
13371337
let channel_id = Some(monitor_impl.channel_id());
13381338
WithChannelMonitor {
13391339
logger, peer_id, channel_id, payment_hash,
@@ -1456,7 +1456,7 @@ impl<Signer: EcdsaChannelSigner> ChannelMonitor<Signer> {
14561456
spendable_txids_confirmed: Vec::new(),
14571457

14581458
best_block,
1459-
counterparty_node_id: Some(counterparty_node_id),
1459+
counterparty_node_id: counterparty_node_id,
14601460
initial_counterparty_commitment_info: None,
14611461
balances_empty_height: None,
14621462

@@ -1782,10 +1782,7 @@ impl<Signer: EcdsaChannelSigner> ChannelMonitor<Signer> {
17821782
}
17831783

17841784
/// Gets the `node_id` of the counterparty for this channel.
1785-
///
1786-
/// Will be `None` for channels constructed on LDK versions prior to 0.0.110 and always `Some`
1787-
/// otherwise.
1788-
pub fn get_counterparty_node_id(&self) -> Option<PublicKey> {
1785+
pub fn get_counterparty_node_id(&self) -> PublicKey {
17891786
self.inner.lock().unwrap().counterparty_node_id
17901787
}
17911788

@@ -3194,12 +3191,8 @@ impl<Signer: EcdsaChannelSigner> ChannelMonitorImpl<Signer> {
31943191
log_funding_info!(self), self.latest_update_id, updates.update_id, updates.updates.len());
31953192
}
31963193

3197-
if updates.counterparty_node_id.is_some() {
3198-
if self.counterparty_node_id.is_none() {
3199-
self.counterparty_node_id = updates.counterparty_node_id;
3200-
} else {
3201-
debug_assert_eq!(self.counterparty_node_id, updates.counterparty_node_id);
3202-
}
3194+
if let Some(counterparty_node_id) = &updates.counterparty_node_id {
3195+
debug_assert_eq!(self.counterparty_node_id, *counterparty_node_id);
32033196
}
32043197

32053198
// ChannelMonitor updates may be applied after force close if we receive a preimage for a
@@ -3370,10 +3363,7 @@ impl<Signer: EcdsaChannelSigner> ChannelMonitorImpl<Signer> {
33703363
package_target_feerate_sat_per_1000_weight, commitment_tx, anchor_output_idx,
33713364
} => {
33723365
let channel_id = self.channel_id;
3373-
// unwrap safety: `ClaimEvent`s are only available for Anchor channels,
3374-
// introduced with v0.0.116. counterparty_node_id is guaranteed to be `Some`
3375-
// since v0.0.110.
3376-
let counterparty_node_id = self.counterparty_node_id.unwrap();
3366+
let counterparty_node_id = self.counterparty_node_id;
33773367
let commitment_txid = commitment_tx.compute_txid();
33783368
debug_assert_eq!(self.current_holder_commitment_tx.txid, commitment_txid);
33793369
let pending_htlcs = self.current_holder_commitment_tx.non_dust_htlcs();
@@ -3404,10 +3394,7 @@ impl<Signer: EcdsaChannelSigner> ChannelMonitorImpl<Signer> {
34043394
target_feerate_sat_per_1000_weight, htlcs, tx_lock_time,
34053395
} => {
34063396
let channel_id = self.channel_id;
3407-
// unwrap safety: `ClaimEvent`s are only available for Anchor channels,
3408-
// introduced with v0.0.116. counterparty_node_id is guaranteed to be `Some`
3409-
// since v0.0.110.
3410-
let counterparty_node_id = self.counterparty_node_id.unwrap();
3397+
let counterparty_node_id = self.counterparty_node_id;
34113398
let mut htlc_descriptors = Vec::with_capacity(htlcs.len());
34123399
for htlc in htlcs {
34133400
htlc_descriptors.push(HTLCDescriptor {
@@ -5135,6 +5122,13 @@ impl<'a, 'b, ES: EntropySource, SP: SignerProvider> ReadableArgs<(&'a ES, &'b SP
51355122
chan_utils::get_to_countersignatory_with_anchors_redeemscript(&payment_point).to_p2wsh();
51365123
}
51375124

5125+
let channel_id = channel_id.unwrap_or(ChannelId::v1_from_funding_outpoint(outpoint));
5126+
if counterparty_node_id.is_none() {
5127+
panic!("Found monitor for channel {} with no updates since v0.0.118.\
5128+
These monitors are no longer supported.\
5129+
To continue, run a v0.1 release, send/route a payment over the channel or close it.", channel_id);
5130+
}
5131+
51385132
Ok((best_block.block_hash, ChannelMonitor::from_impl(ChannelMonitorImpl {
51395133
latest_update_id,
51405134
commitment_transaction_number_obscure_factor,
@@ -5146,7 +5140,7 @@ impl<'a, 'b, ES: EntropySource, SP: SignerProvider> ReadableArgs<(&'a ES, &'b SP
51465140

51475141
channel_keys_id,
51485142
holder_revocation_basepoint,
5149-
channel_id: channel_id.unwrap_or(ChannelId::v1_from_funding_outpoint(outpoint)),
5143+
channel_id,
51505144
funding_info,
51515145
first_confirmed_funding_txo: first_confirmed_funding_txo.0.unwrap(),
51525146
current_counterparty_commitment_txid,
@@ -5190,7 +5184,7 @@ impl<'a, 'b, ES: EntropySource, SP: SignerProvider> ReadableArgs<(&'a ES, &'b SP
51905184
spendable_txids_confirmed: spendable_txids_confirmed.unwrap(),
51915185

51925186
best_block,
5193-
counterparty_node_id,
5187+
counterparty_node_id: counterparty_node_id.unwrap(),
51945188
initial_counterparty_commitment_info,
51955189
balances_empty_height,
51965190
failed_back_htlc_ids: new_hash_set(),

lightning/src/chain/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ pub trait Watch<ChannelSigner: EcdsaChannelSigner> {
304304
///
305305
/// For details on asynchronous [`ChannelMonitor`] updating and returning
306306
/// [`MonitorEvent::Completed`] here, see [`ChannelMonitorUpdateStatus::InProgress`].
307-
fn release_pending_monitor_events(&self) -> Vec<(OutPoint, ChannelId, Vec<MonitorEvent>, Option<PublicKey>)>;
307+
fn release_pending_monitor_events(&self) -> Vec<(OutPoint, ChannelId, Vec<MonitorEvent>, PublicKey)>;
308308
}
309309

310310
/// The `Filter` trait defines behavior for indicating chain activity of interest pertaining to

lightning/src/ln/channelmanager.rs

Lines changed: 66 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -7687,24 +7687,12 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
76877687
(htlc_forwards, decode_update_add_htlcs)
76887688
}
76897689

7690-
fn channel_monitor_updated(&self, funding_txo: &OutPoint, channel_id: &ChannelId, highest_applied_update_id: u64, counterparty_node_id: Option<&PublicKey>) {
7690+
fn channel_monitor_updated(&self, funding_txo: &OutPoint, channel_id: &ChannelId, highest_applied_update_id: u64, counterparty_node_id: &PublicKey) {
76917691
debug_assert!(self.total_consistency_lock.try_write().is_err()); // Caller holds read lock
76927692

7693-
let counterparty_node_id = match counterparty_node_id {
7694-
Some(cp_id) => cp_id.clone(),
7695-
None => {
7696-
// TODO: Once we can rely on the counterparty_node_id from the
7697-
// monitor event, this and the outpoint_to_peer map should be removed.
7698-
let outpoint_to_peer = self.outpoint_to_peer.lock().unwrap();
7699-
match outpoint_to_peer.get(funding_txo) {
7700-
Some(cp_id) => cp_id.clone(),
7701-
None => return,
7702-
}
7703-
}
7704-
};
77057693
let per_peer_state = self.per_peer_state.read().unwrap();
77067694
let mut peer_state_lock;
7707-
let peer_state_mutex_opt = per_peer_state.get(&counterparty_node_id);
7695+
let peer_state_mutex_opt = per_peer_state.get(counterparty_node_id);
77087696
if peer_state_mutex_opt.is_none() { return }
77097697
peer_state_lock = peer_state_mutex_opt.unwrap().lock().unwrap();
77107698
let peer_state = &mut *peer_state_lock;
@@ -7715,7 +7703,7 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
77157703
pending.len()
77167704
} else { 0 };
77177705

7718-
let logger = WithContext::from(&self.logger, Some(counterparty_node_id), Some(*channel_id), None);
7706+
let logger = WithContext::from(&self.logger, Some(*counterparty_node_id), Some(*channel_id), None);
77197707
log_trace!(logger, "ChannelMonitor updated to {}. {} pending in-flight updates.",
77207708
highest_applied_update_id, remaining_in_flight);
77217709

@@ -9467,67 +9455,56 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
94679455
for monitor_event in monitor_events.drain(..) {
94689456
match monitor_event {
94699457
MonitorEvent::HTLCEvent(htlc_update) => {
9470-
let logger = WithContext::from(&self.logger, counterparty_node_id, Some(channel_id), Some(htlc_update.payment_hash));
9458+
let logger = WithContext::from(&self.logger, Some(counterparty_node_id), Some(channel_id), Some(htlc_update.payment_hash));
94719459
if let Some(preimage) = htlc_update.payment_preimage {
94729460
log_trace!(logger, "Claiming HTLC with preimage {} from our monitor", preimage);
94739461
self.claim_funds_internal(htlc_update.source, preimage,
94749462
htlc_update.htlc_value_satoshis.map(|v| v * 1000), None, true,
9475-
false, counterparty_node_id, funding_outpoint, channel_id, None);
9463+
false, Some(counterparty_node_id), funding_outpoint, channel_id, None);
94769464
} else {
94779465
log_trace!(logger, "Failing HTLC with hash {} from our monitor", &htlc_update.payment_hash);
9478-
let receiver = HTLCDestination::NextHopChannel { node_id: counterparty_node_id, channel_id };
9466+
let receiver = HTLCDestination::NextHopChannel { node_id: Some(counterparty_node_id), channel_id };
94799467
let reason = HTLCFailReason::from_failure_code(0x4000 | 8);
94809468
self.fail_htlc_backwards_internal(&htlc_update.source, &htlc_update.payment_hash, &reason, receiver);
94819469
}
94829470
},
94839471
MonitorEvent::HolderForceClosed(_) | MonitorEvent::HolderForceClosedWithInfo { .. } => {
9484-
let counterparty_node_id_opt = match counterparty_node_id {
9485-
Some(cp_id) => Some(cp_id),
9486-
None => {
9487-
// TODO: Once we can rely on the counterparty_node_id from the
9488-
// monitor event, this and the outpoint_to_peer map should be removed.
9489-
let outpoint_to_peer = self.outpoint_to_peer.lock().unwrap();
9490-
outpoint_to_peer.get(&funding_outpoint).cloned()
9491-
}
9492-
};
9493-
if let Some(counterparty_node_id) = counterparty_node_id_opt {
9494-
let per_peer_state = self.per_peer_state.read().unwrap();
9495-
if let Some(peer_state_mutex) = per_peer_state.get(&counterparty_node_id) {
9496-
let mut peer_state_lock = peer_state_mutex.lock().unwrap();
9497-
let peer_state = &mut *peer_state_lock;
9498-
let pending_msg_events = &mut peer_state.pending_msg_events;
9499-
if let hash_map::Entry::Occupied(mut chan_entry) = peer_state.channel_by_id.entry(channel_id) {
9500-
let reason = if let MonitorEvent::HolderForceClosedWithInfo { reason, .. } = monitor_event {
9501-
reason
9502-
} else {
9503-
ClosureReason::HolderForceClosed { broadcasted_latest_txn: Some(true) }
9504-
};
9505-
let mut shutdown_res = chan_entry.get_mut().force_shutdown(false, reason.clone());
9506-
let chan = remove_channel_entry!(self, peer_state, chan_entry, shutdown_res);
9507-
failed_channels.push(shutdown_res);
9508-
if let Some(funded_chan) = chan.as_funded() {
9509-
if let Ok(update) = self.get_channel_update_for_broadcast(funded_chan) {
9510-
let mut pending_broadcast_messages = self.pending_broadcast_messages.lock().unwrap();
9511-
pending_broadcast_messages.push(MessageSendEvent::BroadcastChannelUpdate {
9512-
msg: update
9513-
});
9514-
}
9515-
pending_msg_events.push(MessageSendEvent::HandleError {
9516-
node_id: funded_chan.context.get_counterparty_node_id(),
9517-
action: msgs::ErrorAction::DisconnectPeer {
9518-
msg: Some(msgs::ErrorMessage {
9519-
channel_id: funded_chan.context.channel_id(),
9520-
data: reason.to_string()
9521-
})
9522-
},
9472+
let per_peer_state = self.per_peer_state.read().unwrap();
9473+
if let Some(peer_state_mutex) = per_peer_state.get(&counterparty_node_id) {
9474+
let mut peer_state_lock = peer_state_mutex.lock().unwrap();
9475+
let peer_state = &mut *peer_state_lock;
9476+
let pending_msg_events = &mut peer_state.pending_msg_events;
9477+
if let hash_map::Entry::Occupied(mut chan_entry) = peer_state.channel_by_id.entry(channel_id) {
9478+
let reason = if let MonitorEvent::HolderForceClosedWithInfo { reason, .. } = monitor_event {
9479+
reason
9480+
} else {
9481+
ClosureReason::HolderForceClosed { broadcasted_latest_txn: Some(true) }
9482+
};
9483+
let mut shutdown_res = chan_entry.get_mut().force_shutdown(false, reason.clone());
9484+
let chan = remove_channel_entry!(self, peer_state, chan_entry, shutdown_res);
9485+
failed_channels.push(shutdown_res);
9486+
if let Some(funded_chan) = chan.as_funded() {
9487+
if let Ok(update) = self.get_channel_update_for_broadcast(funded_chan) {
9488+
let mut pending_broadcast_messages = self.pending_broadcast_messages.lock().unwrap();
9489+
pending_broadcast_messages.push(MessageSendEvent::BroadcastChannelUpdate {
9490+
msg: update
95239491
});
95249492
}
9493+
pending_msg_events.push(MessageSendEvent::HandleError {
9494+
node_id: counterparty_node_id,
9495+
action: msgs::ErrorAction::DisconnectPeer {
9496+
msg: Some(msgs::ErrorMessage {
9497+
channel_id: funded_chan.context.channel_id(),
9498+
data: reason.to_string()
9499+
})
9500+
},
9501+
});
95259502
}
95269503
}
95279504
}
95289505
},
95299506
MonitorEvent::Completed { funding_txo, channel_id, monitor_update_id } => {
9530-
self.channel_monitor_updated(&funding_txo, &channel_id, monitor_update_id, counterparty_node_id.as_ref());
9507+
self.channel_monitor_updated(&funding_txo, &channel_id, monitor_update_id, &counterparty_node_id);
95319508
},
95329509
}
95339510
}
@@ -13757,26 +13734,26 @@ where
1375713734
for (channel_id, monitor) in args.channel_monitors.iter() {
1375813735
if !channel_id_set.contains(channel_id) {
1375913736
let mut should_queue_fc_update = false;
13760-
if let Some(counterparty_node_id) = monitor.get_counterparty_node_id() {
13761-
// If the ChannelMonitor had any updates, we may need to update it further and
13762-
// thus track it in `closed_channel_monitor_update_ids`. If the channel never
13763-
// had any updates at all, there can't be any HTLCs pending which we need to
13764-
// claim.
13765-
// Note that a `ChannelMonitor` is created with `update_id` 0 and after we
13766-
// provide it with a closure update its `update_id` will be at 1.
13767-
if !monitor.no_further_updates_allowed() || monitor.get_latest_update_id() > 1 {
13768-
should_queue_fc_update = !monitor.no_further_updates_allowed();
13769-
let mut latest_update_id = monitor.get_latest_update_id();
13770-
if should_queue_fc_update {
13771-
latest_update_id += 1;
13772-
}
13773-
per_peer_state.entry(counterparty_node_id)
13774-
.or_insert_with(|| Mutex::new(empty_peer_state()))
13775-
.lock().unwrap()
13776-
.closed_channel_monitor_update_ids.entry(monitor.channel_id())
13777-
.and_modify(|v| *v = cmp::max(latest_update_id, *v))
13778-
.or_insert(latest_update_id);
13737+
let counterparty_node_id = monitor.get_counterparty_node_id();
13738+
13739+
// If the ChannelMonitor had any updates, we may need to update it further and
13740+
// thus track it in `closed_channel_monitor_update_ids`. If the channel never
13741+
// had any updates at all, there can't be any HTLCs pending which we need to
13742+
// claim.
13743+
// Note that a `ChannelMonitor` is created with `update_id` 0 and after we
13744+
// provide it with a closure update its `update_id` will be at 1.
13745+
if !monitor.no_further_updates_allowed() || monitor.get_latest_update_id() > 1 {
13746+
should_queue_fc_update = !monitor.no_further_updates_allowed();
13747+
let mut latest_update_id = monitor.get_latest_update_id();
13748+
if should_queue_fc_update {
13749+
latest_update_id += 1;
1377913750
}
13751+
per_peer_state.entry(counterparty_node_id)
13752+
.or_insert_with(|| Mutex::new(empty_peer_state()))
13753+
.lock().unwrap()
13754+
.closed_channel_monitor_update_ids.entry(monitor.channel_id())
13755+
.and_modify(|v| *v = cmp::max(latest_update_id, *v))
13756+
.or_insert(latest_update_id);
1378013757
}
1378113758

1378213759
if !should_queue_fc_update {
@@ -13787,31 +13764,20 @@ where
1378713764
let channel_id = monitor.channel_id();
1378813765
log_info!(logger, "Queueing monitor update to ensure missing channel {} is force closed",
1378913766
&channel_id);
13790-
let mut monitor_update = ChannelMonitorUpdate {
13767+
let monitor_update = ChannelMonitorUpdate {
1379113768
update_id: monitor.get_latest_update_id().saturating_add(1),
13792-
counterparty_node_id: None,
13769+
counterparty_node_id: Some(counterparty_node_id),
1379313770
updates: vec![ChannelMonitorUpdateStep::ChannelForceClosed { should_broadcast: true }],
1379413771
channel_id: Some(monitor.channel_id()),
1379513772
};
1379613773
let funding_txo = monitor.get_funding_txo();
13797-
if let Some(counterparty_node_id) = monitor.get_counterparty_node_id() {
13798-
let update = BackgroundEvent::MonitorUpdateRegeneratedOnStartup {
13799-
counterparty_node_id,
13800-
funding_txo,
13801-
channel_id,
13802-
update: monitor_update,
13803-
};
13804-
close_background_events.push(update);
13805-
} else {
13806-
// This is a fairly old `ChannelMonitor` that hasn't seen an update to its
13807-
// off-chain state since LDK 0.0.118 (as in LDK 0.0.119 any off-chain
13808-
// `ChannelMonitorUpdate` will set the counterparty ID).
13809-
// Thus, we assume that it has no pending HTLCs and we will not need to
13810-
// generate a `ChannelMonitorUpdate` for it aside from this
13811-
// `ChannelForceClosed` one.
13812-
monitor_update.update_id = u64::MAX;
13813-
close_background_events.push(BackgroundEvent::ClosedMonitorUpdateRegeneratedOnStartup((funding_txo, channel_id, monitor_update)));
13814-
}
13774+
let update = BackgroundEvent::MonitorUpdateRegeneratedOnStartup {
13775+
counterparty_node_id,
13776+
funding_txo,
13777+
channel_id,
13778+
update: monitor_update,
13779+
};
13780+
close_background_events.push(update);
1381513781
}
1381613782
}
1381713783

@@ -14370,7 +14336,7 @@ where
1437014336
// downstream chan is closed (because we don't have a
1437114337
// channel_id -> peer map entry).
1437214338
counterparty_opt.is_none(),
14373-
counterparty_opt.cloned().or(monitor.get_counterparty_node_id()),
14339+
Some(monitor.get_counterparty_node_id()),
1437414340
monitor.get_funding_txo(), monitor.channel_id()))
1437514341
} else { None }
1437614342
} else {
@@ -15055,8 +15021,8 @@ mod tests {
1505515021
let nodes = create_network(2, &node_cfgs, &node_chanmgrs);
1505615022

1505715023
create_announced_chan_between_nodes(&nodes, 0, 1);
15058-
15059-
// Since we do not send peer storage, we manually simulate receiving a dummy
15024+
15025+
// Since we do not send peer storage, we manually simulate receiving a dummy
1506015026
// `PeerStorage` from the channel partner.
1506115027
nodes[0].node.handle_peer_storage(nodes[1].node.get_our_node_id(), msgs::PeerStorage{data: vec![0; 100]});
1506215028

0 commit comments

Comments
 (0)