@@ -14136,6 +14136,7 @@ mod tests {
14136
14136
use crate::ln::script::ShutdownScript;
14137
14137
use crate::prelude::*;
14138
14138
use crate::routing::router::{Path, RouteHop};
14139
+ #[cfg(ldk_test_vectors)]
14139
14140
use crate::sign::{ChannelSigner, EntropySource, InMemorySigner, SignerProvider};
14140
14141
#[cfg(splicing)]
14141
14142
use crate::sync::Mutex;
@@ -14156,8 +14157,7 @@ mod tests {
14156
14157
use bitcoin::hex::FromHex;
14157
14158
use bitcoin::locktime::absolute::LockTime;
14158
14159
use bitcoin::network::Network;
14159
- use bitcoin::opcodes;
14160
- use bitcoin::script::{Builder, ScriptBuf};
14160
+ use bitcoin::script::Builder;
14161
14161
use bitcoin::secp256k1::ffi::Signature as FFISignature;
14162
14162
use bitcoin::secp256k1::{ecdsa::Signature, Secp256k1};
14163
14163
use bitcoin::secp256k1::{PublicKey, SecretKey};
@@ -14166,7 +14166,7 @@ mod tests {
14166
14166
use bitcoin::transaction::{Transaction, TxOut, Version};
14167
14167
#[cfg(splicing)]
14168
14168
use bitcoin::Weight;
14169
- use bitcoin::{WPubkeyHash, WitnessProgram, WitnessVersion};
14169
+ use bitcoin::{WitnessProgram, WitnessVersion};
14170
14170
use std::cmp;
14171
14171
14172
14172
#[test]
@@ -14192,17 +14192,19 @@ mod tests {
14192
14192
);
14193
14193
}
14194
14194
14195
- #[allow(dead_code )]
14195
+ #[cfg(ldk_test_vectors )]
14196
14196
struct Keys {
14197
- signer: InMemorySigner,
14197
+ signer: crate::sign:: InMemorySigner,
14198
14198
}
14199
14199
14200
+ #[cfg(ldk_test_vectors)]
14200
14201
impl EntropySource for Keys {
14201
14202
fn get_secure_random_bytes(&self) -> [u8; 32] {
14202
14203
[0; 32]
14203
14204
}
14204
14205
}
14205
14206
14207
+ #[cfg(ldk_test_vectors)]
14206
14208
impl SignerProvider for Keys {
14207
14209
type EcdsaSigner = InMemorySigner;
14208
14210
#[cfg(taproot)]
@@ -14216,16 +14218,18 @@ mod tests {
14216
14218
self.signer.clone()
14217
14219
}
14218
14220
14219
- fn get_destination_script(&self, _channel_keys_id: [u8; 32]) -> Result<ScriptBuf, ()> {
14221
+ fn get_destination_script(
14222
+ &self, _channel_keys_id: [u8; 32],
14223
+ ) -> Result<bitcoin::script::ScriptBuf, ()> {
14220
14224
let secp_ctx = Secp256k1::signing_only();
14221
14225
let hex = "0fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff";
14222
14226
let channel_monitor_claim_key =
14223
14227
SecretKey::from_slice(&<Vec<u8>>::from_hex(hex).unwrap()[..]).unwrap();
14224
- let channel_monitor_claim_key_hash = WPubkeyHash::hash(
14228
+ let channel_monitor_claim_key_hash = bitcoin:: WPubkeyHash::hash(
14225
14229
&PublicKey::from_secret_key(&secp_ctx, &channel_monitor_claim_key).serialize(),
14226
14230
);
14227
14231
Ok(Builder::new()
14228
- .push_opcode(opcodes::all::OP_PUSHBYTES_0)
14232
+ .push_opcode(bitcoin:: opcodes::all::OP_PUSHBYTES_0)
14229
14233
.push_slice(channel_monitor_claim_key_hash)
14230
14234
.into_script())
14231
14235
}
@@ -15906,7 +15910,7 @@ mod tests {
15906
15910
fn funding_input_sats(input_value_sats: u64) -> (TxIn, Transaction, Weight) {
15907
15911
use crate::sign::P2WPKH_WITNESS_WEIGHT;
15908
15912
15909
- let input_1_prev_out = TxOut { value: Amount::from_sat(input_value_sats), script_pubkey: ScriptBuf::default() };
15913
+ let input_1_prev_out = TxOut { value: Amount::from_sat(input_value_sats), script_pubkey: bitcoin:: ScriptBuf::default() };
15910
15914
let input_1_prev_tx = Transaction {
15911
15915
input: vec![], output: vec![input_1_prev_out],
15912
15916
version: Version::TWO, lock_time: bitcoin::absolute::LockTime::ZERO,
0 commit comments