projects
/
rust-lightning
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Give ChannelMonitor a logger via new ReadableArgs trait
[rust-lightning]
/
src
/
util
/
test_utils.rs
diff --git
a/src/util/test_utils.rs
b/src/util/test_utils.rs
index 4fa29fd8e95c94b3a52850dc5867aa4f0f1caed0..3981750c89a6c8af2febc9a9a3c533c095f5ba30 100644
(file)
--- a/
src/util/test_utils.rs
+++ b/
src/util/test_utils.rs
@@
-6,7
+6,7
@@
use ln::msgs;
use ln::msgs::{HandleError};
use util::events;
use util::logger::{Logger, Level, Record};
use ln::msgs::{HandleError};
use util::events;
use util::logger::{Logger, Level, Record};
-use util::ser::{Readable, Writer};
+use util::ser::{Readable
Args
, Writer};
use bitcoin::blockdata::transaction::Transaction;
use bitcoin::blockdata::transaction::Transaction;
@@
-55,7
+55,7
@@
impl channelmonitor::ManyChannelMonitor for TestChannelMonitor {
// to a watchtower and disk...
let mut w = VecWriter(Vec::new());
monitor.write_for_disk(&mut w).unwrap();
// to a watchtower and disk...
let mut w = VecWriter(Vec::new());
monitor.write_for_disk(&mut w).unwrap();
- assert!(channelmonitor::ChannelMonitor::read(&mut ::std::io::Cursor::new(&w.0)).unwrap() == monitor);
+ assert!(channelmonitor::ChannelMonitor::read(&mut ::std::io::Cursor::new(&w.0)
, Arc::new(TestLogger::new())
).unwrap() == monitor);
w.0.clear();
monitor.write_for_watchtower(&mut w).unwrap(); // This at least shouldn't crash...
self.added_monitors.lock().unwrap().push((funding_txo, monitor.clone()));
w.0.clear();
monitor.write_for_watchtower(&mut w).unwrap(); // This at least shouldn't crash...
self.added_monitors.lock().unwrap().push((funding_txo, monitor.clone()));