Skip to content

Commit 531bda9

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 c689888 commit 531bda9

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
@@ -8131,7 +8131,7 @@ fn test_update_err_monitor_lockdown() {
81318131
let mut w = test_utils::TestVecWriter(Vec::new());
81328132
monitor.write(&mut w).unwrap();
81338133
let new_monitor = <(BlockHash, channelmonitor::ChannelMonitor<EnforcingSigner>)>::read(
8134-
&mut io::Cursor::new(&w.0), &test_utils::OnlyReadsKeysInterface {}).unwrap().1;
8134+
&mut io::Cursor::new(&w.0), nodes[0].keys_manager).unwrap().1;
81358135
assert!(new_monitor == *monitor);
81368136
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);
81378137
assert_eq!(watchtower.watch_channel(outpoint, new_monitor), ChannelMonitorUpdateStatus::Completed);
@@ -8195,7 +8195,7 @@ fn test_concurrent_monitor_claim() {
81958195
let mut w = test_utils::TestVecWriter(Vec::new());
81968196
monitor.write(&mut w).unwrap();
81978197
let new_monitor = <(BlockHash, channelmonitor::ChannelMonitor<EnforcingSigner>)>::read(
8198-
&mut io::Cursor::new(&w.0), &test_utils::OnlyReadsKeysInterface {}).unwrap().1;
8198+
&mut io::Cursor::new(&w.0), nodes[0].keys_manager).unwrap().1;
81998199
assert!(new_monitor == *monitor);
82008200
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);
82018201
assert_eq!(watchtower.watch_channel(outpoint, new_monitor), ChannelMonitorUpdateStatus::Completed);
@@ -8224,7 +8224,7 @@ fn test_concurrent_monitor_claim() {
82248224
let mut w = test_utils::TestVecWriter(Vec::new());
82258225
monitor.write(&mut w).unwrap();
82268226
let new_monitor = <(BlockHash, channelmonitor::ChannelMonitor<EnforcingSigner>)>::read(
8227-
&mut io::Cursor::new(&w.0), &test_utils::OnlyReadsKeysInterface {}).unwrap().1;
8227+
&mut io::Cursor::new(&w.0), nodes[0].keys_manager).unwrap().1;
82288228
assert!(new_monitor == *monitor);
82298229
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);
82308230
assert_eq!(watchtower.watch_channel(outpoint, new_monitor), ChannelMonitorUpdateStatus::Completed);

0 commit comments

Comments
 (0)