X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=fuzz%2Fsrc%2Fchanmon_deser.rs;h=75a4044b5718568b3173a2622779845b9e204b17;hb=0f5580afd42c6604e8035738b20c28a9628eae72;hp=fd326cc2ec85bdc72670da4cae4f7388366c05af;hpb=4345aa88ae415e558a177321a87905a134d4e24a;p=rust-lightning diff --git a/fuzz/src/chanmon_deser.rs b/fuzz/src/chanmon_deser.rs index fd326cc2..75a4044b 100644 --- a/fuzz/src/chanmon_deser.rs +++ b/fuzz/src/chanmon_deser.rs @@ -5,7 +5,7 @@ use bitcoin::hash_types::BlockHash; use lightning::chain::channelmonitor; use lightning::util::enforcing_trait_impls::EnforcingChannelKeys; -use lightning::util::ser::{Readable, Writer}; +use lightning::util::ser::{Readable, Writer, Writeable}; use utils::test_logger; @@ -26,7 +26,7 @@ impl Writer for VecWriter { pub fn do_test(data: &[u8], _out: Out) { if let Ok((latest_block_hash, monitor)) = <(BlockHash, channelmonitor::ChannelMonitor)>::read(&mut Cursor::new(data)) { let mut w = VecWriter(Vec::new()); - monitor.serialize_for_disk(&mut w).unwrap(); + monitor.write(&mut w).unwrap(); let deserialized_copy = <(BlockHash, channelmonitor::ChannelMonitor)>::read(&mut Cursor::new(&w.0)).unwrap(); assert!(latest_block_hash == deserialized_copy.0); assert!(monitor == deserialized_copy.1);