BDR: Linearizing secp256k1 deps
[rust-lightning] / lightning / src / ln / chan_utils.rs
index d576fd338cf692271ceb5ff85ffc6c31fd1b2ce0..3ab440d95f254d18da9ed677e6435ed864d26aa2 100644 (file)
@@ -8,20 +8,20 @@ use bitcoin::blockdata::transaction::{TxIn,TxOut,OutPoint,Transaction, SigHashTy
 use bitcoin::consensus::encode::{self, Decodable, Encodable};
 use bitcoin::util::bip143;
 
-use bitcoin_hashes::{Hash, HashEngine};
-use bitcoin_hashes::sha256::Hash as Sha256;
-use bitcoin_hashes::ripemd160::Hash as Ripemd160;
-use bitcoin_hashes::hash160::Hash as Hash160;
-use bitcoin_hashes::sha256d::Hash as Sha256dHash;
+use bitcoin::hashes::{Hash, HashEngine};
+use bitcoin::hashes::sha256::Hash as Sha256;
+use bitcoin::hashes::ripemd160::Hash as Ripemd160;
+use bitcoin::hashes::hash160::Hash as Hash160;
+use bitcoin::hashes::sha256d::Hash as Sha256dHash;
 
 use ln::channelmanager::{PaymentHash, PaymentPreimage};
 use ln::msgs::DecodeError;
 use util::ser::{Readable, Writeable, Writer, WriterWriteAdaptor};
 use util::byte_utils;
 
-use secp256k1::key::{SecretKey, PublicKey};
-use secp256k1::{Secp256k1, Signature};
-use secp256k1;
+use bitcoin::secp256k1::key::{SecretKey, PublicKey};
+use bitcoin::secp256k1::{Secp256k1, Signature};
+use bitcoin::secp256k1;
 
 use std::{cmp, mem};
 
@@ -614,8 +614,6 @@ impl LocalCommitmentTransaction {
                for this_htlc in self.per_htlc.iter() {
                        if this_htlc.0.transaction_output_index.is_some() {
                                let htlc_tx = build_htlc_transaction(&txid, self.feerate_per_kw, local_csv, &this_htlc.0, &self.local_keys.a_delayed_payment_key, &self.local_keys.revocation_key);
-                               assert_eq!(htlc_tx.input.len(), 1);
-                               assert_eq!(htlc_tx.input[0].witness.len(), 0);
 
                                let htlc_redeemscript = get_htlc_redeemscript_with_explicit_keys(&this_htlc.0, &self.local_keys.a_htlc_key, &self.local_keys.b_htlc_key, &self.local_keys.revocation_key);
 
@@ -642,8 +640,6 @@ impl LocalCommitmentTransaction {
                // Channel should have checked that we have a remote signature for this HTLC at
                // creation, and we should have a sensible htlc transaction:
                assert!(this_htlc.1.is_some());
-               assert_eq!(htlc_tx.input.len(), 1);
-               assert_eq!(htlc_tx.input[0].witness.len(), 0);
 
                let htlc_redeemscript = get_htlc_redeemscript_with_explicit_keys(&this_htlc.0, &self.local_keys.a_htlc_key, &self.local_keys.b_htlc_key, &self.local_keys.revocation_key);