File tree Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -2358,11 +2358,7 @@ impl<SP: Deref> ChannelContext<SP> where SP::Target: SignerProvider {
2358
2358
where F: Fn() -> Option<O> {
2359
2359
match self.channel_state {
2360
2360
ChannelState::FundingNegotiated => f(),
2361
- ChannelState::AwaitingChannelReady(flags) => if flags.is_set(AwaitingChannelReadyFlags::WAITING_FOR_BATCH) {
2362
- f()
2363
- } else {
2364
- None
2365
- },
2361
+ ChannelState::AwaitingChannelReady(flags) if flags.is_set(AwaitingChannelReadyFlags::WAITING_FOR_BATCH) => f(),
2366
2362
_ => None,
2367
2363
}
2368
2364
}
@@ -2424,11 +2420,7 @@ impl<SP: Deref> ChannelContext<SP> where SP::Target: SignerProvider {
2424
2420
// funding transaction, don't return a funding txo (which prevents providing the
2425
2421
// monitor update to the user, even if we return one).
2426
2422
// See test_duplicate_chan_id and test_pre_lockin_no_chan_closed_update for more.
2427
- let generate_monitor_update = match self.channel_state {
2428
- ChannelState::AwaitingChannelReady(_)|ChannelState::ChannelReady(_)|ChannelState::ShutdownComplete => true,
2429
- _ => false,
2430
- };
2431
- if generate_monitor_update {
2423
+ if !self.channel_state.is_pre_funded_state() {
2432
2424
self.latest_monitor_update_id = CLOSED_CHANNEL_UPDATE_ID;
2433
2425
Some((self.get_counterparty_node_id(), funding_txo, ChannelMonitorUpdate {
2434
2426
update_id: self.latest_monitor_update_id,
You can’t perform that action at this time.
0 commit comments