Skip to content

Commit 5defb92

Browse files
committed
Avoid use of OnlyReadsKeysInterface
Since `ChannelMonitor`s will now re-derive signers rather than persisting them, we can no longer use the OnlyReadsKeysInterface concrete implementation.
1 parent 4401fc5 commit 5defb92

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lightning/src/ln/chanmon_update_fail_tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ fn test_monitor_and_persister_update_fail() {
112112
let mut w = test_utils::TestVecWriter(Vec::new());
113113
monitor.write(&mut w).unwrap();
114114
let new_monitor = <(BlockHash, ChannelMonitor<EnforcingSigner>)>::read(
115-
&mut io::Cursor::new(&w.0), &test_utils::OnlyReadsKeysInterface {}).unwrap().1;
115+
&mut io::Cursor::new(&w.0), nodes[0].keys_manager).unwrap().1;
116116
assert!(new_monitor == *monitor);
117117
let chain_mon = test_utils::TestChainMonitor::new(Some(&chain_source), &tx_broadcaster, &logger, &chanmon_cfgs[0].fee_estimator, &persister, &node_cfgs[0].keys_manager);
118118
assert_eq!(chain_mon.watch_channel(outpoint, new_monitor), ChannelMonitorUpdateStatus::Completed);

lightning/src/ln/functional_tests.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8113,7 +8113,7 @@ fn test_update_err_monitor_lockdown() {
81138113
let mut w = test_utils::TestVecWriter(Vec::new());
81148114
monitor.write(&mut w).unwrap();
81158115
let new_monitor = <(BlockHash, channelmonitor::ChannelMonitor<EnforcingSigner>)>::read(
8116-
&mut io::Cursor::new(&w.0), &test_utils::OnlyReadsKeysInterface {}).unwrap().1;
8116+
&mut io::Cursor::new(&w.0), nodes[0].keys_manager).unwrap().1;
81178117
assert!(new_monitor == *monitor);
81188118
let watchtower = test_utils::TestChainMonitor::new(Some(&chain_source), &chanmon_cfgs[0].tx_broadcaster, &logger, &chanmon_cfgs[0].fee_estimator, &persister, &node_cfgs[0].keys_manager);
81198119
assert_eq!(watchtower.watch_channel(outpoint, new_monitor), ChannelMonitorUpdateStatus::Completed);
@@ -8177,7 +8177,7 @@ fn test_concurrent_monitor_claim() {
81778177
let mut w = test_utils::TestVecWriter(Vec::new());
81788178
monitor.write(&mut w).unwrap();
81798179
let new_monitor = <(BlockHash, channelmonitor::ChannelMonitor<EnforcingSigner>)>::read(
8180-
&mut io::Cursor::new(&w.0), &test_utils::OnlyReadsKeysInterface {}).unwrap().1;
8180+
&mut io::Cursor::new(&w.0), nodes[0].keys_manager).unwrap().1;
81818181
assert!(new_monitor == *monitor);
81828182
let watchtower = test_utils::TestChainMonitor::new(Some(&chain_source), &chanmon_cfgs[0].tx_broadcaster, &logger, &chanmon_cfgs[0].fee_estimator, &persister, &node_cfgs[0].keys_manager);
81838183
assert_eq!(watchtower.watch_channel(outpoint, new_monitor), ChannelMonitorUpdateStatus::Completed);
@@ -8206,7 +8206,7 @@ fn test_concurrent_monitor_claim() {
82068206
let mut w = test_utils::TestVecWriter(Vec::new());
82078207
monitor.write(&mut w).unwrap();
82088208
let new_monitor = <(BlockHash, channelmonitor::ChannelMonitor<EnforcingSigner>)>::read(
8209-
&mut io::Cursor::new(&w.0), &test_utils::OnlyReadsKeysInterface {}).unwrap().1;
8209+
&mut io::Cursor::new(&w.0), nodes[0].keys_manager).unwrap().1;
82108210
assert!(new_monitor == *monitor);
82118211
let watchtower = test_utils::TestChainMonitor::new(Some(&chain_source), &chanmon_cfgs[0].tx_broadcaster, &logger, &chanmon_cfgs[0].fee_estimator, &persister, &node_cfgs[0].keys_manager);
82128212
assert_eq!(watchtower.watch_channel(outpoint, new_monitor), ChannelMonitorUpdateStatus::Completed);

0 commit comments

Comments
 (0)