projects
/
rust-lightning
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix debug panic in onion utils on large custom TLVs or metadata.
[rust-lightning]
/
fuzz
/
src
/
utils
/
test_logger.rs
diff --git
a/fuzz/src/utils/test_logger.rs
b/fuzz/src/utils/test_logger.rs
index 36e0945f5412c987b09769637ed379ecd49130ba..5e5817e23f1f92d18f5d83406db2cff23319491d 100644
(file)
--- a/
fuzz/src/utils/test_logger.rs
+++ b/
fuzz/src/utils/test_logger.rs
@@
-11,7
+11,7
@@
use lightning::util::logger::{Logger, Record};
use std::sync::{Arc, Mutex};
use std::io::Write;
use std::sync::{Arc, Mutex};
use std::io::Write;
-pub trait Output : Clone
+ Sync + Send
+ 'static {
+pub trait Output : Clone + 'static {
fn locked_write(&self, data: &[u8]);
}
fn locked_write(&self, data: &[u8]);
}
@@
-56,9
+56,9
@@
impl<'a, Out: Output> Write for LockedWriteAdapter<'a, Out> {
}
impl<Out: Output> Logger for TestLogger<Out> {
}
impl<Out: Output> Logger for TestLogger<Out> {
- fn log(&self, record:
&
Record) {
+ fn log(&self, record: Record) {
write!(LockedWriteAdapter(&self.out),
write!(LockedWriteAdapter(&self.out),
- "{:<5} {} [{} : {}
, {}] {}\n", record.level.to_string(), self.id, record.module_path, record.file
, record.line, record.args)
+ "{:<5} {} [{} : {}
] {}\n", record.level.to_string(), self.id, record.module_path
, record.line, record.args)
.unwrap();
}
}
.unwrap();
}
}