Skip to content

Commit 4ccb1e4

Browse files
authored
Merge pull request #290 from TheBlueMatt/2019-01-monitor-update-handle-fuzz
Handle monitor update failures in two more places + new fuzz test
2 parents 3117e18 + 49d6330 commit 4ccb1e4

10 files changed

+999
-161
lines changed

fuzz/Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ path = "fuzz_targets/peer_crypt_target.rs"
4444
name = "full_stack_target"
4545
path = "fuzz_targets/full_stack_target.rs"
4646

47+
[[bin]]
48+
name = "chanmon_fail_consistency"
49+
path = "fuzz_targets/chanmon_fail_consistency.rs"
50+
4751
[[bin]]
4852
name = "router_target"
4953
path = "fuzz_targets/router_target.rs"

fuzz/fuzz_targets/chanmon_deser_target.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ impl Writer for VecWriter {
3030
#[inline]
3131
pub fn do_test(data: &[u8]) {
3232
reset_rng_state();
33-
let logger = Arc::new(test_logger::TestLogger{});
33+
let logger = Arc::new(test_logger::TestLogger::new("".to_owned()));
3434
if let Ok((latest_block_hash, monitor)) = <(Sha256dHash, channelmonitor::ChannelMonitor)>::read(&mut Cursor::new(data), logger.clone()) {
3535
let mut w = VecWriter(Vec::new());
3636
monitor.write_for_disk(&mut w).unwrap();

0 commit comments

Comments
 (0)