You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: fuzz/fuzz_targets/full_stack_target.rs
+51-4Lines changed: 51 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -5,15 +5,17 @@ extern crate secp256k1;
5
5
6
6
use bitcoin::blockdata::block::BlockHeader;
7
7
use bitcoin::blockdata::transaction::{Transaction,TxOut};
8
-
use bitcoin::blockdata::script::Script;
8
+
use bitcoin::blockdata::script::{Builder,Script};
9
+
use bitcoin::blockdata::opcodes;
9
10
use bitcoin::network::constants::Network;
10
11
use bitcoin::network::serialize::{deserialize, serialize,BitcoinHash};
11
-
use bitcoin::util::hash::Sha256dHash;
12
+
use bitcoin::util::hash::{Sha256dHash,Hash160};
12
13
13
14
use crypto::digest::Digest;
14
15
15
16
use lightning::chain::chaininterface::{BroadcasterInterface,ConfirmationTarget,ChainListener,FeeEstimator,ChainWatchInterfaceUtil};
16
17
use lightning::chain::transaction::OutPoint;
18
+
use lightning::chain::keysinterface::{ChannelKeys,KeysInterface};
17
19
use lightning::ln::channelmonitor;
18
20
use lightning::ln::channelmanager::{ChannelManager,PaymentFailReason};
19
21
use lightning::ln::peer_handler::{MessageHandler,PeerManager,SocketDescriptor};
@@ -196,6 +198,50 @@ impl<'a> Drop for MoneyLossDetector<'a> {
196
198
}
197
199
}
198
200
201
+
structKeyProvider{
202
+
node_secret:SecretKey,
203
+
}
204
+
implKeysInterfaceforKeyProvider{
205
+
fnget_node_secret(&self) -> SecretKey{
206
+
self.node_secret.clone()
207
+
}
208
+
209
+
fnget_destination_script(&self) -> Script{
210
+
let secp_ctx = Secp256k1::signing_only();
211
+
let channel_monitor_claim_key = SecretKey::from_slice(&secp_ctx,&hex::decode("0fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff").unwrap()[..]).unwrap();
212
+
let our_channel_monitor_claim_key_hash = Hash160::from_data(&PublicKey::from_secret_key(&secp_ctx,&channel_monitor_claim_key).serialize());
0 commit comments