Skip to content

Commit 31b0a13

Browse files
authored
Merge pull request #1957 from TheBlueMatt/2022-01-mon-ref-lockorder
Pass MonitorUpdates by ref and tweak manager lockorder
2 parents 01fe9ba + bae81ba commit 31b0a13

9 files changed

+47
-43
lines changed

fuzz/src/chanmon_consistency.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,15 +152,15 @@ impl chain::Watch<EnforcingSigner> for TestChainMonitor {
152152
self.chain_monitor.watch_channel(funding_txo, monitor)
153153
}
154154

155-
fn update_channel(&self, funding_txo: OutPoint, update: channelmonitor::ChannelMonitorUpdate) -> chain::ChannelMonitorUpdateStatus {
155+
fn update_channel(&self, funding_txo: OutPoint, update: &channelmonitor::ChannelMonitorUpdate) -> chain::ChannelMonitorUpdateStatus {
156156
let mut map_lock = self.latest_monitors.lock().unwrap();
157157
let mut map_entry = match map_lock.entry(funding_txo) {
158158
hash_map::Entry::Occupied(entry) => entry,
159159
hash_map::Entry::Vacant(_) => panic!("Didn't have monitor on update call"),
160160
};
161161
let deserialized_monitor = <(BlockHash, channelmonitor::ChannelMonitor<EnforcingSigner>)>::
162162
read(&mut Cursor::new(&map_entry.get().1), (&*self.keys, &*self.keys)).unwrap().1;
163-
deserialized_monitor.update_monitor(&update, &&TestBroadcaster{}, &FuzzEstimator { ret_val: atomic::AtomicU32::new(253) }, &self.logger).unwrap();
163+
deserialized_monitor.update_monitor(update, &&TestBroadcaster{}, &FuzzEstimator { ret_val: atomic::AtomicU32::new(253) }, &self.logger).unwrap();
164164
let mut ser = VecWriter(Vec::new());
165165
deserialized_monitor.write(&mut ser).unwrap();
166166
map_entry.insert((update.update_id, ser.0));

fuzz/src/utils/test_persister.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ impl chainmonitor::Persist<EnforcingSigner> for TestPersister {
1414
self.update_ret.lock().unwrap().clone()
1515
}
1616

17-
fn update_persisted_channel(&self, _funding_txo: OutPoint, _update: &Option<channelmonitor::ChannelMonitorUpdate>, _data: &channelmonitor::ChannelMonitor<EnforcingSigner>, _update_id: MonitorUpdateId) -> chain::ChannelMonitorUpdateStatus {
17+
fn update_persisted_channel(&self, _funding_txo: OutPoint, _update: Option<&channelmonitor::ChannelMonitorUpdate>, _data: &channelmonitor::ChannelMonitor<EnforcingSigner>, _update_id: MonitorUpdateId) -> chain::ChannelMonitorUpdateStatus {
1818
self.update_ret.lock().unwrap().clone()
1919
}
2020
}

lightning/src/chain/chainmonitor.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ pub trait Persist<ChannelSigner: Sign> {
144144
/// [`ChannelMonitorUpdateStatus`] for requirements when returning errors.
145145
///
146146
/// [`Writeable::write`]: crate::util::ser::Writeable::write
147-
fn update_persisted_channel(&self, channel_id: OutPoint, update: &Option<ChannelMonitorUpdate>, data: &ChannelMonitor<ChannelSigner>, update_id: MonitorUpdateId) -> ChannelMonitorUpdateStatus;
147+
fn update_persisted_channel(&self, channel_id: OutPoint, update: Option<&ChannelMonitorUpdate>, data: &ChannelMonitor<ChannelSigner>, update_id: MonitorUpdateId) -> ChannelMonitorUpdateStatus;
148148
}
149149

150150
struct MonitorHolder<ChannelSigner: Sign> {
@@ -294,7 +294,7 @@ where C::Target: chain::Filter,
294294
}
295295

296296
log_trace!(self.logger, "Syncing Channel Monitor for channel {}", log_funding_info!(monitor));
297-
match self.persister.update_persisted_channel(*funding_outpoint, &None, monitor, update_id) {
297+
match self.persister.update_persisted_channel(*funding_outpoint, None, monitor, update_id) {
298298
ChannelMonitorUpdateStatus::Completed =>
299299
log_trace!(self.logger, "Finished syncing Channel Monitor for channel {}", log_funding_info!(monitor)),
300300
ChannelMonitorUpdateStatus::PermanentFailure => {
@@ -646,7 +646,7 @@ where C::Target: chain::Filter,
646646

647647
/// Note that we persist the given `ChannelMonitor` update while holding the
648648
/// `ChainMonitor` monitors lock.
649-
fn update_channel(&self, funding_txo: OutPoint, update: ChannelMonitorUpdate) -> ChannelMonitorUpdateStatus {
649+
fn update_channel(&self, funding_txo: OutPoint, update: &ChannelMonitorUpdate) -> ChannelMonitorUpdateStatus {
650650
// Update the monitor that watches the channel referred to by the given outpoint.
651651
let monitors = self.monitors.read().unwrap();
652652
match monitors.get(&funding_txo) {
@@ -664,15 +664,15 @@ where C::Target: chain::Filter,
664664
Some(monitor_state) => {
665665
let monitor = &monitor_state.monitor;
666666
log_trace!(self.logger, "Updating ChannelMonitor for channel {}", log_funding_info!(monitor));
667-
let update_res = monitor.update_monitor(&update, &self.broadcaster, &*self.fee_estimator, &self.logger);
667+
let update_res = monitor.update_monitor(update, &self.broadcaster, &*self.fee_estimator, &self.logger);
668668
if update_res.is_err() {
669669
log_error!(self.logger, "Failed to update ChannelMonitor for channel {}.", log_funding_info!(monitor));
670670
}
671671
// Even if updating the monitor returns an error, the monitor's state will
672672
// still be changed. So, persist the updated monitor despite the error.
673-
let update_id = MonitorUpdateId::from_monitor_update(&update);
673+
let update_id = MonitorUpdateId::from_monitor_update(update);
674674
let mut pending_monitor_updates = monitor_state.pending_monitor_updates.lock().unwrap();
675-
let persist_res = self.persister.update_persisted_channel(funding_txo, &Some(update), monitor, update_id);
675+
let persist_res = self.persister.update_persisted_channel(funding_txo, Some(update), monitor, update_id);
676676
match persist_res {
677677
ChannelMonitorUpdateStatus::InProgress => {
678678
pending_monitor_updates.push(update_id);

lightning/src/chain/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ pub trait Watch<ChannelSigner: Sign> {
312312
/// [`ChannelMonitorUpdateStatus`] for invariants around returning an error.
313313
///
314314
/// [`update_monitor`]: channelmonitor::ChannelMonitor::update_monitor
315-
fn update_channel(&self, funding_txo: OutPoint, update: ChannelMonitorUpdate) -> ChannelMonitorUpdateStatus;
315+
fn update_channel(&self, funding_txo: OutPoint, update: &ChannelMonitorUpdate) -> ChannelMonitorUpdateStatus;
316316

317317
/// Returns any monitor events since the last call. Subsequent calls must only return new
318318
/// events.

lightning/src/ln/chanmon_update_fail_tests.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,9 @@ fn test_monitor_and_persister_update_fail() {
147147
// Check that even though the persister is returning a InProgress,
148148
// because the update is bogus, ultimately the error that's returned
149149
// should be a PermanentFailure.
150-
if let ChannelMonitorUpdateStatus::PermanentFailure = chain_mon.chain_monitor.update_channel(outpoint, update.clone()) {} else { panic!("Expected monitor error to be permanent"); }
150+
if let ChannelMonitorUpdateStatus::PermanentFailure = chain_mon.chain_monitor.update_channel(outpoint, &update) {} else { panic!("Expected monitor error to be permanent"); }
151151
logger.assert_log_regex("lightning::chain::chainmonitor".to_string(), regex::Regex::new("Persistence of ChannelMonitorUpdate for channel [0-9a-f]* in progress").unwrap(), 1);
152-
assert_eq!(nodes[0].chain_monitor.update_channel(outpoint, update), ChannelMonitorUpdateStatus::Completed);
152+
assert_eq!(nodes[0].chain_monitor.update_channel(outpoint, &update), ChannelMonitorUpdateStatus::Completed);
153153
} else { assert!(false); }
154154
}
155155

lightning/src/ln/channelmanager.rs

Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -577,13 +577,13 @@ pub type SimpleRefChannelManager<'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, M, T, F, L> = C
577577
// | |
578578
// | |__`pending_intercepted_htlcs`
579579
// |
580-
// |__`pending_inbound_payments`
580+
// |__`per_peer_state`
581581
// | |
582-
// | |__`claimable_payments`
583-
// | |
584-
// | |__`pending_outbound_payments` // This field's struct contains a map of pending outbounds
582+
// | |__`pending_inbound_payments`
583+
// | |
584+
// | |__`claimable_payments`
585585
// | |
586-
// | |__`per_peer_state`
586+
// | |__`pending_outbound_payments` // This field's struct contains a map of pending outbounds
587587
// | |
588588
// | |__`peer_state`
589589
// | |
@@ -1709,7 +1709,7 @@ where
17091709

17101710
// Update the monitor with the shutdown script if necessary.
17111711
if let Some(monitor_update) = monitor_update {
1712-
let update_res = self.chain_monitor.update_channel(chan_entry.get().get_funding_txo().unwrap(), monitor_update);
1712+
let update_res = self.chain_monitor.update_channel(chan_entry.get().get_funding_txo().unwrap(), &monitor_update);
17131713
let (result, is_permanent) =
17141714
handle_monitor_update_res!(self, update_res, chan_entry.get_mut(), RAACommitmentOrder::CommitmentFirst, chan_entry.key(), NO_UPDATE);
17151715
if is_permanent {
@@ -1807,7 +1807,7 @@ where
18071807
// force-closing. The monitor update on the required in-memory copy should broadcast
18081808
// the latest local state, which is the best we can do anyway. Thus, it is safe to
18091809
// ignore the result here.
1810-
let _ = self.chain_monitor.update_channel(funding_txo, monitor_update);
1810+
let _ = self.chain_monitor.update_channel(funding_txo, &monitor_update);
18111811
}
18121812
}
18131813

@@ -2336,7 +2336,7 @@ where
23362336
chan)
23372337
} {
23382338
Some((update_add, commitment_signed, monitor_update)) => {
2339-
let update_err = self.chain_monitor.update_channel(chan.get().get_funding_txo().unwrap(), monitor_update);
2339+
let update_err = self.chain_monitor.update_channel(chan.get().get_funding_txo().unwrap(), &monitor_update);
23402340
let chan_id = chan.get().channel_id();
23412341
match (update_err,
23422342
handle_monitor_update_res!(self, update_err, chan,
@@ -3284,7 +3284,7 @@ where
32843284
BackgroundEvent::ClosingMonitorUpdate((funding_txo, update)) => {
32853285
// The channel has already been closed, so no use bothering to care about the
32863286
// monitor updating completing.
3287-
let _ = self.chain_monitor.update_channel(funding_txo, update);
3287+
let _ = self.chain_monitor.update_channel(funding_txo, &update);
32883288
},
32893289
}
32903290
}
@@ -3570,9 +3570,12 @@ where
35703570
// Ensure that no peer state channel storage lock is not held when calling this
35713571
// function.
35723572
// This ensures that future code doesn't introduce a lock_order requirement for
3573-
// `forward_htlcs` to be locked after the `per_peer_state` locks, which calling this
3574-
// function with the `per_peer_state` aquired would.
3575-
assert!(self.per_peer_state.try_write().is_ok());
3573+
// `forward_htlcs` to be locked after the `per_peer_state` peer locks, which calling
3574+
// this function with any `per_peer_state` peer lock aquired would.
3575+
let per_peer_state = self.per_peer_state.read().unwrap();
3576+
for (_, peer) in per_peer_state.iter() {
3577+
assert!(peer.try_lock().is_ok());
3578+
}
35763579
}
35773580

35783581
//TODO: There is a timing attack here where if a node fails an HTLC back to us they can
@@ -3807,7 +3810,7 @@ where
38073810
match chan.get_mut().get_update_fulfill_htlc_and_commit(prev_hop.htlc_id, payment_preimage, &self.logger) {
38083811
Ok(msgs_monitor_option) => {
38093812
if let UpdateFulfillCommitFetch::NewClaim { msgs, htlc_value_msat, monitor_update } = msgs_monitor_option {
3810-
match self.chain_monitor.update_channel(chan.get().get_funding_txo().unwrap(), monitor_update) {
3813+
match self.chain_monitor.update_channel(chan.get().get_funding_txo().unwrap(), &monitor_update) {
38113814
ChannelMonitorUpdateStatus::Completed => {},
38123815
e => {
38133816
log_given_level!(self.logger, if e == ChannelMonitorUpdateStatus::PermanentFailure { Level::Error } else { Level::Debug },
@@ -3844,7 +3847,7 @@ where
38443847
}
38453848
},
38463849
Err((e, monitor_update)) => {
3847-
match self.chain_monitor.update_channel(chan.get().get_funding_txo().unwrap(), monitor_update) {
3850+
match self.chain_monitor.update_channel(chan.get().get_funding_txo().unwrap(), &monitor_update) {
38483851
ChannelMonitorUpdateStatus::Completed => {},
38493852
e => {
38503853
// TODO: This needs to be handled somehow - if we receive a monitor update
@@ -3880,7 +3883,7 @@ where
38803883
};
38813884
// We update the ChannelMonitor on the backward link, after
38823885
// receiving an `update_fulfill_htlc` from the forward link.
3883-
let update_res = self.chain_monitor.update_channel(prev_hop.outpoint, preimage_update);
3886+
let update_res = self.chain_monitor.update_channel(prev_hop.outpoint, &preimage_update);
38843887
if update_res != ChannelMonitorUpdateStatus::Completed {
38853888
// TODO: This needs to be handled somehow - if we receive a monitor update
38863889
// with a preimage we *must* somehow manage to propagate it to the upstream
@@ -4449,7 +4452,7 @@ where
44494452

44504453
// Update the monitor with the shutdown script if necessary.
44514454
if let Some(monitor_update) = monitor_update {
4452-
let update_res = self.chain_monitor.update_channel(chan_entry.get().get_funding_txo().unwrap(), monitor_update);
4455+
let update_res = self.chain_monitor.update_channel(chan_entry.get().get_funding_txo().unwrap(), &monitor_update);
44534456
let (result, is_permanent) =
44544457
handle_monitor_update_res!(self, update_res, chan_entry.get_mut(), RAACommitmentOrder::CommitmentFirst, chan_entry.key(), NO_UPDATE);
44554458
if is_permanent {
@@ -4650,13 +4653,13 @@ where
46504653
Err((None, e)) => try_chan_entry!(self, Err(e), chan),
46514654
Err((Some(update), e)) => {
46524655
assert!(chan.get().is_awaiting_monitor_update());
4653-
let _ = self.chain_monitor.update_channel(chan.get().get_funding_txo().unwrap(), update);
4656+
let _ = self.chain_monitor.update_channel(chan.get().get_funding_txo().unwrap(), &update);
46544657
try_chan_entry!(self, Err(e), chan);
46554658
unreachable!();
46564659
},
46574660
Ok(res) => res
46584661
};
4659-
let update_res = self.chain_monitor.update_channel(chan.get().get_funding_txo().unwrap(), monitor_update);
4662+
let update_res = self.chain_monitor.update_channel(chan.get().get_funding_txo().unwrap(), &monitor_update);
46604663
if let Err(e) = handle_monitor_update_res!(self, update_res, chan, RAACommitmentOrder::RevokeAndACKFirst, true, commitment_signed.is_some()) {
46614664
return Err(e);
46624665
}
@@ -4792,7 +4795,7 @@ where
47924795
let raa_updates = break_chan_entry!(self,
47934796
chan.get_mut().revoke_and_ack(&msg, &self.logger), chan);
47944797
htlcs_to_fail = raa_updates.holding_cell_failed_htlcs;
4795-
let update_res = self.chain_monitor.update_channel(chan.get().get_funding_txo().unwrap(), raa_updates.monitor_update);
4798+
let update_res = self.chain_monitor.update_channel(chan.get().get_funding_txo().unwrap(), &raa_updates.monitor_update);
47964799
if was_paused_for_mon_update {
47974800
assert!(update_res != ChannelMonitorUpdateStatus::Completed);
47984801
assert!(raa_updates.commitment_update.is_none());
@@ -5097,7 +5100,7 @@ where
50975100
));
50985101
}
50995102
if let Some((commitment_update, monitor_update)) = commitment_opt {
5100-
match self.chain_monitor.update_channel(chan.get_funding_txo().unwrap(), monitor_update) {
5103+
match self.chain_monitor.update_channel(chan.get_funding_txo().unwrap(), &monitor_update) {
51015104
ChannelMonitorUpdateStatus::Completed => {
51025105
pending_msg_events.push(events::MessageSendEvent::UpdateHTLCs {
51035106
node_id: chan.get_counterparty_node_id(),
@@ -6739,6 +6742,8 @@ where
67396742
}
67406743
}
67416744

6745+
let per_peer_state = self.per_peer_state.write().unwrap();
6746+
67426747
let pending_inbound_payments = self.pending_inbound_payments.lock().unwrap();
67436748
let claimable_payments = self.claimable_payments.lock().unwrap();
67446749
let pending_outbound_payments = self.pending_outbound_payments.pending_outbound_payments.lock().unwrap();
@@ -6754,7 +6759,6 @@ where
67546759
htlc_purposes.push(purpose);
67556760
}
67566761

6757-
let per_peer_state = self.per_peer_state.write().unwrap();
67586762
(per_peer_state.len() as u64).write(writer)?;
67596763
for (peer_pubkey, peer_state_mutex) in per_peer_state.iter() {
67606764
peer_pubkey.write(writer)?;

lightning/src/ln/functional_tests.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8135,8 +8135,8 @@ fn test_update_err_monitor_lockdown() {
81358135
let mut node_0_peer_state_lock;
81368136
let mut channel = get_channel_ref!(nodes[0], nodes[1], node_0_per_peer_lock, node_0_peer_state_lock, chan_1.2);
81378137
if let Ok((_, _, update)) = channel.commitment_signed(&updates.commitment_signed, &node_cfgs[0].logger) {
8138-
assert_eq!(watchtower.chain_monitor.update_channel(outpoint, update.clone()), ChannelMonitorUpdateStatus::PermanentFailure);
8139-
assert_eq!(nodes[0].chain_monitor.update_channel(outpoint, update), ChannelMonitorUpdateStatus::Completed);
8138+
assert_eq!(watchtower.chain_monitor.update_channel(outpoint, &update), ChannelMonitorUpdateStatus::PermanentFailure);
8139+
assert_eq!(nodes[0].chain_monitor.update_channel(outpoint, &update), ChannelMonitorUpdateStatus::Completed);
81408140
} else { assert!(false); }
81418141
}
81428142
// Our local monitor is in-sync and hasn't processed yet timeout
@@ -8230,9 +8230,9 @@ fn test_concurrent_monitor_claim() {
82308230
let mut channel = get_channel_ref!(nodes[0], nodes[1], node_0_per_peer_lock, node_0_peer_state_lock, chan_1.2);
82318231
if let Ok((_, _, update)) = channel.commitment_signed(&updates.commitment_signed, &node_cfgs[0].logger) {
82328232
// Watchtower Alice should already have seen the block and reject the update
8233-
assert_eq!(watchtower_alice.chain_monitor.update_channel(outpoint, update.clone()), ChannelMonitorUpdateStatus::PermanentFailure);
8234-
assert_eq!(watchtower_bob.chain_monitor.update_channel(outpoint, update.clone()), ChannelMonitorUpdateStatus::Completed);
8235-
assert_eq!(nodes[0].chain_monitor.update_channel(outpoint, update), ChannelMonitorUpdateStatus::Completed);
8233+
assert_eq!(watchtower_alice.chain_monitor.update_channel(outpoint, &update), ChannelMonitorUpdateStatus::PermanentFailure);
8234+
assert_eq!(watchtower_bob.chain_monitor.update_channel(outpoint, &update), ChannelMonitorUpdateStatus::Completed);
8235+
assert_eq!(nodes[0].chain_monitor.update_channel(outpoint, &update), ChannelMonitorUpdateStatus::Completed);
82368236
} else { assert!(false); }
82378237
}
82388238
// Our local monitor is in-sync and hasn't processed yet timeout

lightning/src/util/persist.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ impl<ChannelSigner: Sign, K: KVStorePersister> Persist<ChannelSigner> for K {
9494
}
9595
}
9696

97-
fn update_persisted_channel(&self, funding_txo: OutPoint, _update: &Option<ChannelMonitorUpdate>, monitor: &ChannelMonitor<ChannelSigner>, _update_id: MonitorUpdateId) -> chain::ChannelMonitorUpdateStatus {
97+
fn update_persisted_channel(&self, funding_txo: OutPoint, _update: Option<&ChannelMonitorUpdate>, monitor: &ChannelMonitor<ChannelSigner>, _update_id: MonitorUpdateId) -> chain::ChannelMonitorUpdateStatus {
9898
let key = format!("monitors/{}_{}", funding_txo.txid.to_hex(), funding_txo.index);
9999
match self.persist(&key, monitor) {
100100
Ok(()) => chain::ChannelMonitorUpdateStatus::Completed,

lightning/src/util/test_utils.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -184,12 +184,12 @@ impl<'a> chain::Watch<EnforcingSigner> for TestChainMonitor<'a> {
184184
self.chain_monitor.watch_channel(funding_txo, new_monitor)
185185
}
186186

187-
fn update_channel(&self, funding_txo: OutPoint, update: channelmonitor::ChannelMonitorUpdate) -> chain::ChannelMonitorUpdateStatus {
187+
fn update_channel(&self, funding_txo: OutPoint, update: &channelmonitor::ChannelMonitorUpdate) -> chain::ChannelMonitorUpdateStatus {
188188
// Every monitor update should survive roundtrip
189189
let mut w = TestVecWriter(Vec::new());
190190
update.write(&mut w).unwrap();
191191
assert!(channelmonitor::ChannelMonitorUpdate::read(
192-
&mut io::Cursor::new(&w.0)).unwrap() == update);
192+
&mut io::Cursor::new(&w.0)).unwrap() == *update);
193193

194194
self.monitor_updates.lock().unwrap().entry(funding_txo.to_channel_id()).or_insert(Vec::new()).push(update.clone());
195195

@@ -202,7 +202,7 @@ impl<'a> chain::Watch<EnforcingSigner> for TestChainMonitor<'a> {
202202
}
203203

204204
self.latest_monitor_update_id.lock().unwrap().insert(funding_txo.to_channel_id(),
205-
(funding_txo, update.update_id, MonitorUpdateId::from_monitor_update(&update)));
205+
(funding_txo, update.update_id, MonitorUpdateId::from_monitor_update(update)));
206206
let update_res = self.chain_monitor.update_channel(funding_txo, update);
207207
// At every point where we get a monitor update, we should be able to send a useful monitor
208208
// to a watchtower and disk...
@@ -254,7 +254,7 @@ impl<Signer: keysinterface::Sign> chainmonitor::Persist<Signer> for TestPersiste
254254
chain::ChannelMonitorUpdateStatus::Completed
255255
}
256256

257-
fn update_persisted_channel(&self, funding_txo: OutPoint, update: &Option<channelmonitor::ChannelMonitorUpdate>, _data: &channelmonitor::ChannelMonitor<Signer>, update_id: MonitorUpdateId) -> chain::ChannelMonitorUpdateStatus {
257+
fn update_persisted_channel(&self, funding_txo: OutPoint, update: Option<&channelmonitor::ChannelMonitorUpdate>, _data: &channelmonitor::ChannelMonitor<Signer>, update_id: MonitorUpdateId) -> chain::ChannelMonitorUpdateStatus {
258258
let mut ret = chain::ChannelMonitorUpdateStatus::Completed;
259259
if let Some(update_ret) = self.update_rets.lock().unwrap().pop_front() {
260260
ret = update_ret;

0 commit comments

Comments
 (0)