projects
/
rust-lightning
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix typo CONTRIBUTING.md
[rust-lightning]
/
fuzz
/
src
/
onion_hop_data.rs
diff --git
a/fuzz/src/onion_hop_data.rs
b/fuzz/src/onion_hop_data.rs
index 54b283ab0f1628974fa3545978699453f65330bb..e7f51b9916775244cb73a87b3b2de57fbe585efa 100644
(file)
--- a/
fuzz/src/onion_hop_data.rs
+++ b/
fuzz/src/onion_hop_data.rs
@@
-11,18
+11,23
@@
// To modify it, modify msg_target_template.txt and run gen_target.sh instead.
use crate::utils::test_logger;
// To modify it, modify msg_target_template.txt and run gen_target.sh instead.
use crate::utils::test_logger;
+use lightning::util::test_utils;
#[inline]
pub fn onion_hop_data_test<Out: test_logger::Output>(data: &[u8], _out: Out) {
#[inline]
pub fn onion_hop_data_test<Out: test_logger::Output>(data: &[u8], _out: Out) {
- use lightning::util::ser::Readable;
+ use lightning::util::ser::ReadableArgs;
+ use bitcoin::secp256k1::PublicKey;
let mut r = ::std::io::Cursor::new(data);
let mut r = ::std::io::Cursor::new(data);
- let _ = <lightning::ln::msgs::InboundOnionPayload as Readable>::read(&mut r);
+ let node_signer = test_utils::TestNodeSigner::new(test_utils::privkey(42));
+ let _ = <lightning::ln::msgs::InboundOnionPayload as ReadableArgs<(Option<PublicKey>, &&test_utils::TestNodeSigner)>>::read(&mut r, (None, &&node_signer));
}
#[no_mangle]
pub extern "C" fn onion_hop_data_run(data: *const u8, datalen: usize) {
}
#[no_mangle]
pub extern "C" fn onion_hop_data_run(data: *const u8, datalen: usize) {
- use lightning::util::ser::Readable;
+ use lightning::util::ser::ReadableArgs;
+ use bitcoin::secp256k1::PublicKey;
let data = unsafe { std::slice::from_raw_parts(data, datalen) };
let mut r = ::std::io::Cursor::new(data);
let data = unsafe { std::slice::from_raw_parts(data, datalen) };
let mut r = ::std::io::Cursor::new(data);
- let _ = <lightning::ln::msgs::InboundOnionPayload as Readable>::read(&mut r);
+ let node_signer = test_utils::TestNodeSigner::new(test_utils::privkey(42));
+ let _ = <lightning::ln::msgs::InboundOnionPayload as ReadableArgs<(Option<PublicKey>, &&test_utils::TestNodeSigner)>>::read(&mut r, (None, &&node_signer));
}
}