Skip to content

Commit 1771fae

Browse files
committed
Remove outpoint_to_peer map in ChannelManager
Now that we require `ChannelMonitor`s to track the channel's counterparty node ID, we can remove the `outpoint_to_peer` map that was used throughout `MonitorEvent` handling. This is a big win for a post-splicing future, as we'll no longer have to bother updating this map when a splice is proposed. Some existing tests providing coverage have been removed as a result.
1 parent 7c1b9cf commit 1771fae

File tree

3 files changed

+40
-290
lines changed

3 files changed

+40
-290
lines changed

lightning/src/ln/async_signer_tests.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ use bitcoin::transaction::Version;
1818

1919
use crate::chain::channelmonitor::LATENCY_GRACE_PERIOD_BLOCKS;
2020
use crate::chain::ChannelMonitorUpdateStatus;
21-
use crate::chain::transaction::OutPoint;
2221
use crate::events::bump_transaction::WalletSource;
2322
use crate::events::{ClosureReason, Event, MessageSendEvent, MessageSendEventsProvider};
2423
use crate::ln::chan_utils::ClosingTransaction;
@@ -1091,9 +1090,4 @@ fn do_test_closing_signed(extra_closing_signed: bool, reconnect: bool) {
10911090
assert!(nodes[1].node.list_channels().is_empty());
10921091
check_closed_event!(nodes[0], 1, ClosureReason::LocallyInitiatedCooperativeClosure, [nodes[1].node.get_our_node_id()], 100000);
10931092
check_closed_event!(nodes[1], 1, ClosureReason::CounterpartyInitiatedCooperativeClosure, [nodes[0].node.get_our_node_id()], 100000);
1094-
1095-
// Check that our maps have been updated after async signing channel closure.
1096-
let funding_outpoint = OutPoint { txid: funding_tx.compute_txid(), index: 0 };
1097-
assert!(nodes[0].node().outpoint_to_peer.lock().unwrap().get(&funding_outpoint).is_none());
1098-
assert!(nodes[1].node().outpoint_to_peer.lock().unwrap().get(&funding_outpoint).is_none());
10991093
}

0 commit comments

Comments
 (0)