File tree 1 file changed +2
-10
lines changed
1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -2322,11 +2322,7 @@ impl<SP: Deref> ChannelContext<SP> where SP::Target: SignerProvider {
2322
2322
where F: Fn() -> Option<O> {
2323
2323
match self.channel_state {
2324
2324
ChannelState::FundingNegotiated => f(),
2325
- ChannelState::AwaitingChannelReady(flags) => if flags.is_set(AwaitingChannelReadyFlags::WAITING_FOR_BATCH) {
2326
- f()
2327
- } else {
2328
- None
2329
- },
2325
+ ChannelState::AwaitingChannelReady(flags) if flags.is_set(AwaitingChannelReadyFlags::WAITING_FOR_BATCH) => f(),
2330
2326
_ => None,
2331
2327
}
2332
2328
}
@@ -2388,11 +2384,7 @@ impl<SP: Deref> ChannelContext<SP> where SP::Target: SignerProvider {
2388
2384
// funding transaction, don't return a funding txo (which prevents providing the
2389
2385
// monitor update to the user, even if we return one).
2390
2386
// See test_duplicate_chan_id and test_pre_lockin_no_chan_closed_update for more.
2391
- let generate_monitor_update = match self.channel_state {
2392
- ChannelState::AwaitingChannelReady(_)|ChannelState::ChannelReady(_)|ChannelState::ShutdownComplete => true,
2393
- _ => false,
2394
- };
2395
- if generate_monitor_update {
2387
+ if !self.channel_state.is_pre_funded_state() {
2396
2388
self.latest_monitor_update_id = CLOSED_CHANNEL_UPDATE_ID;
2397
2389
Some((self.get_counterparty_node_id(), funding_txo, ChannelMonitorUpdate {
2398
2390
update_id: self.latest_monitor_update_id,
You can’t perform that action at this time.
0 commit comments