projects
/
rust-lightning
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #777 from sr-gi/cm-force-close-checks
[rust-lightning]
/
fuzz
/
src
/
chanmon_deser.rs
diff --git
a/fuzz/src/chanmon_deser.rs
b/fuzz/src/chanmon_deser.rs
index 75a4044b5718568b3173a2622779845b9e204b17..596ff275b7b1925eb4871ec28f4e941036ce4533 100644
(file)
--- a/
fuzz/src/chanmon_deser.rs
+++ b/
fuzz/src/chanmon_deser.rs
@@
-5,7
+5,8
@@
use bitcoin::hash_types::BlockHash;
use lightning::chain::channelmonitor;
use lightning::util::enforcing_trait_impls::EnforcingChannelKeys;
use lightning::chain::channelmonitor;
use lightning::util::enforcing_trait_impls::EnforcingChannelKeys;
-use lightning::util::ser::{Readable, Writer, Writeable};
+use lightning::util::ser::{ReadableArgs, Writer, Writeable};
+use lightning::util::test_utils::OnlyReadsKeysInterface;
use utils::test_logger;
use utils::test_logger;
@@
-24,10
+25,10
@@
impl Writer for VecWriter {
#[inline]
pub fn do_test<Out: test_logger::Output>(data: &[u8], _out: Out) {
#[inline]
pub fn do_test<Out: test_logger::Output>(data: &[u8], _out: Out) {
- if let Ok((latest_block_hash, monitor)) = <(BlockHash, channelmonitor::ChannelMonitor<EnforcingChannelKeys>)>::read(&mut Cursor::new(data)) {
+ if let Ok((latest_block_hash, monitor)) = <(BlockHash, channelmonitor::ChannelMonitor<EnforcingChannelKeys>)>::read(&mut Cursor::new(data)
, &OnlyReadsKeysInterface {}
) {
let mut w = VecWriter(Vec::new());
monitor.write(&mut w).unwrap();
let mut w = VecWriter(Vec::new());
monitor.write(&mut w).unwrap();
- let deserialized_copy = <(BlockHash, channelmonitor::ChannelMonitor<EnforcingChannelKeys>)>::read(&mut Cursor::new(&w.0)).unwrap();
+ let deserialized_copy = <(BlockHash, channelmonitor::ChannelMonitor<EnforcingChannelKeys>)>::read(&mut Cursor::new(&w.0)
, &OnlyReadsKeysInterface {}
).unwrap();
assert!(latest_block_hash == deserialized_copy.0);
assert!(monitor == deserialized_copy.1);
}
assert!(latest_block_hash == deserialized_copy.0);
assert!(monitor == deserialized_copy.1);
}