mirror of
https://github.com/lightningdevkit/rust-lightning.git
synced 2025-02-25 07:17:40 +01:00
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.
This commit is contained in:
parent
bfc848e892
commit
215619bace
2 changed files with 4 additions and 4 deletions
|
@ -112,7 +112,7 @@ fn test_monitor_and_persister_update_fail() {
|
|||
let mut w = test_utils::TestVecWriter(Vec::new());
|
||||
monitor.write(&mut w).unwrap();
|
||||
let new_monitor = <(BlockHash, ChannelMonitor<EnforcingSigner>)>::read(
|
||||
&mut io::Cursor::new(&w.0), &test_utils::OnlyReadsKeysInterface {}).unwrap().1;
|
||||
&mut io::Cursor::new(&w.0), nodes[0].keys_manager).unwrap().1;
|
||||
assert!(new_monitor == *monitor);
|
||||
let chain_mon = test_utils::TestChainMonitor::new(Some(&chain_source), &tx_broadcaster, &logger, &chanmon_cfgs[0].fee_estimator, &persister, &node_cfgs[0].keys_manager);
|
||||
assert_eq!(chain_mon.watch_channel(outpoint, new_monitor), ChannelMonitorUpdateStatus::Completed);
|
||||
|
|
|
@ -8131,7 +8131,7 @@ fn test_update_err_monitor_lockdown() {
|
|||
let mut w = test_utils::TestVecWriter(Vec::new());
|
||||
monitor.write(&mut w).unwrap();
|
||||
let new_monitor = <(BlockHash, channelmonitor::ChannelMonitor<EnforcingSigner>)>::read(
|
||||
&mut io::Cursor::new(&w.0), &test_utils::OnlyReadsKeysInterface {}).unwrap().1;
|
||||
&mut io::Cursor::new(&w.0), nodes[0].keys_manager).unwrap().1;
|
||||
assert!(new_monitor == *monitor);
|
||||
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);
|
||||
assert_eq!(watchtower.watch_channel(outpoint, new_monitor), ChannelMonitorUpdateStatus::Completed);
|
||||
|
@ -8195,7 +8195,7 @@ fn test_concurrent_monitor_claim() {
|
|||
let mut w = test_utils::TestVecWriter(Vec::new());
|
||||
monitor.write(&mut w).unwrap();
|
||||
let new_monitor = <(BlockHash, channelmonitor::ChannelMonitor<EnforcingSigner>)>::read(
|
||||
&mut io::Cursor::new(&w.0), &test_utils::OnlyReadsKeysInterface {}).unwrap().1;
|
||||
&mut io::Cursor::new(&w.0), nodes[0].keys_manager).unwrap().1;
|
||||
assert!(new_monitor == *monitor);
|
||||
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);
|
||||
assert_eq!(watchtower.watch_channel(outpoint, new_monitor), ChannelMonitorUpdateStatus::Completed);
|
||||
|
@ -8224,7 +8224,7 @@ fn test_concurrent_monitor_claim() {
|
|||
let mut w = test_utils::TestVecWriter(Vec::new());
|
||||
monitor.write(&mut w).unwrap();
|
||||
let new_monitor = <(BlockHash, channelmonitor::ChannelMonitor<EnforcingSigner>)>::read(
|
||||
&mut io::Cursor::new(&w.0), &test_utils::OnlyReadsKeysInterface {}).unwrap().1;
|
||||
&mut io::Cursor::new(&w.0), nodes[0].keys_manager).unwrap().1;
|
||||
assert!(new_monitor == *monitor);
|
||||
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);
|
||||
assert_eq!(watchtower.watch_channel(outpoint, new_monitor), ChannelMonitorUpdateStatus::Completed);
|
||||
|
|
Loading…
Add table
Reference in a new issue