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 #1863 from TheBlueMatt/2022-11-holding-cell-batch-update
[rust-lightning]
/
fuzz
/
src
/
chanmon_deser.rs
diff --git
a/fuzz/src/chanmon_deser.rs
b/fuzz/src/chanmon_deser.rs
index 596ff275b7b1925eb4871ec28f4e941036ce4533..8c8f4aedf7a438d2a6ecf7b0f9a2eb95d9c6877d 100644
(file)
--- a/
fuzz/src/chanmon_deser.rs
+++ b/
fuzz/src/chanmon_deser.rs
@@
-4,11
+4,11
@@
use bitcoin::hash_types::BlockHash;
use lightning::chain::channelmonitor;
use bitcoin::hash_types::BlockHash;
use lightning::chain::channelmonitor;
-use lightning::util::enforcing_trait_impls::Enforcing
ChannelKeys
;
+use lightning::util::enforcing_trait_impls::Enforcing
Signer
;
use lightning::util::ser::{ReadableArgs, Writer, Writeable};
use lightning::util::test_utils::OnlyReadsKeysInterface;
use lightning::util::ser::{ReadableArgs, Writer, Writeable};
use lightning::util::test_utils::OnlyReadsKeysInterface;
-use utils::test_logger;
+use
crate::
utils::test_logger;
use std::io::Cursor;
use std::io::Cursor;
@@
-18,17
+18,14
@@
impl Writer for VecWriter {
self.0.extend_from_slice(buf);
Ok(())
}
self.0.extend_from_slice(buf);
Ok(())
}
- fn size_hint(&mut self, size: usize) {
- self.0.reserve_exact(size);
- }
}
#[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<Enforcing
ChannelKeys
>)>::read(&mut Cursor::new(data), &OnlyReadsKeysInterface {}) {
+ if let Ok((latest_block_hash, monitor)) = <(BlockHash, channelmonitor::ChannelMonitor<Enforcing
Signer
>)>::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<Enforcing
ChannelKeys
>)>::read(&mut Cursor::new(&w.0), &OnlyReadsKeysInterface {}).unwrap();
+ let deserialized_copy = <(BlockHash, channelmonitor::ChannelMonitor<Enforcing
Signer
>)>::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);
}