Bitcoin deps refactoring (BDR): Linearizing bitcoin_hash deps
authorDr. Maxim Orlovsky <orlovsky@pandoracore.com>
Mon, 27 Apr 2020 14:41:54 +0000 (16:41 +0200)
committerDr. Maxim Orlovsky <orlovsky@pandoracore.com>
Tue, 28 Apr 2020 14:17:42 +0000 (16:17 +0200)
27 files changed:
fuzz/src/chanmon_consistency.rs
fuzz/src/chanmon_deser.rs
fuzz/src/full_stack.rs
fuzz/src/router.rs
lightning-net-tokio/Cargo.toml
lightning/Cargo.toml
lightning/src/chain/chaininterface.rs
lightning/src/chain/keysinterface.rs
lightning/src/chain/transaction.rs
lightning/src/lib.rs
lightning/src/ln/chan_utils.rs
lightning/src/ln/chanmon_update_fail_tests.rs
lightning/src/ln/channel.rs
lightning/src/ln/channelmanager.rs
lightning/src/ln/channelmonitor.rs
lightning/src/ln/functional_test_utils.rs
lightning/src/ln/functional_tests.rs
lightning/src/ln/msgs.rs
lightning/src/ln/onchaintx.rs
lightning/src/ln/onion_utils.rs
lightning/src/ln/peer_channel_encryptor.rs
lightning/src/ln/peer_handler.rs
lightning/src/ln/router.rs
lightning/src/util/chacha20poly1305rfc.rs
lightning/src/util/macro_logger.rs
lightning/src/util/ser.rs
lightning/src/util/test_utils.rs

index fcc88454fe5e5290433d0ae7860e0757f63082af..344d099ff052463932f8fda81c4ce827e12d4833 100644 (file)
@@ -16,10 +16,10 @@ use bitcoin::blockdata::script::{Builder, Script};
 use bitcoin::blockdata::opcodes;
 use bitcoin::network::constants::Network;
 
-use bitcoin_hashes::Hash as TraitImport;
-use bitcoin_hashes::hash160::Hash as Hash160;
-use bitcoin_hashes::sha256::Hash as Sha256;
-use bitcoin_hashes::sha256d::Hash as Sha256d;
+use bitcoin::hashes::Hash as TraitImport;
+use bitcoin::hashes::hash160::Hash as Hash160;
+use bitcoin::hashes::sha256::Hash as Sha256;
+use bitcoin::hashes::sha256d::Hash as Sha256d;
 
 use lightning::chain::chaininterface;
 use lightning::chain::transaction::OutPoint;
index abff1319a9bccd4fabdfe68ec28fdc8279c1312c..45da43c0bee63b4fd64baa87b54a3d07bed00d18 100644 (file)
@@ -1,7 +1,7 @@
 // This file is auto-generated by gen_target.sh based on msg_target_template.txt
 // To modify it, modify msg_target_template.txt and run gen_target.sh instead.
 
-use bitcoin_hashes::sha256d::Hash as Sha256dHash;
+use bitcoin::hashes::sha256d::Hash as Sha256dHash;
 
 use lightning::util::enforcing_trait_impls::EnforcingChannelKeys;
 use lightning::ln::channelmonitor;
index 76953548eb4bd4895af9ab7dea4c4e46cb370e5c..d8b58264e7a624742f53e9528b6b1ae755f1549c 100644 (file)
@@ -12,11 +12,11 @@ use bitcoin::consensus::encode::deserialize;
 use bitcoin::network::constants::Network;
 use bitcoin::util::hash::BitcoinHash;
 
-use bitcoin_hashes::Hash as TraitImport;
-use bitcoin_hashes::HashEngine as TraitImportEngine;
-use bitcoin_hashes::sha256::Hash as Sha256;
-use bitcoin_hashes::hash160::Hash as Hash160;
-use bitcoin_hashes::sha256d::Hash as Sha256dHash;
+use bitcoin::hashes::Hash as TraitImport;
+use bitcoin::hashes::HashEngine as TraitImportEngine;
+use bitcoin::hashes::sha256::Hash as Sha256;
+use bitcoin::hashes::hash160::Hash as Hash160;
+use bitcoin::hashes::sha256d::Hash as Sha256dHash;
 
 use lightning::chain::chaininterface::{BroadcasterInterface,ConfirmationTarget,ChainListener,FeeEstimator,ChainWatchInterfaceUtil};
 use lightning::chain::transaction::OutPoint;
@@ -241,7 +241,7 @@ impl KeysInterface for KeyProvider {
        fn get_destination_script(&self) -> Script {
                let secp_ctx = Secp256k1::signing_only();
                let channel_monitor_claim_key = SecretKey::from_slice(&hex::decode("0fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff").unwrap()[..]).unwrap();
-               let our_channel_monitor_claim_key_hash = <Hash160 as bitcoin_hashes::Hash>::hash(&PublicKey::from_secret_key(&secp_ctx, &channel_monitor_claim_key).serialize());
+               let our_channel_monitor_claim_key_hash = <Hash160 as bitcoin::hashes::Hash>::hash(&PublicKey::from_secret_key(&secp_ctx, &channel_monitor_claim_key).serialize());
                Builder::new().push_opcode(opcodes::all::OP_PUSHBYTES_0).push_slice(&our_channel_monitor_claim_key_hash[..]).into_script()
        }
 
index 7dcf1de72217c848cd70fd90497fafb9fac04648..83e9a6abdb1a9fd3ebca283058a3e460606fa6a6 100644 (file)
@@ -1,4 +1,4 @@
-use bitcoin_hashes::sha256d::Hash as Sha256dHash;
+use bitcoin::hashes::sha256d::Hash as Sha256dHash;
 use bitcoin::blockdata::script::{Script, Builder};
 use bitcoin::blockdata::block::Block;
 use bitcoin::blockdata::transaction::Transaction;
index adfedea7bcc2666e46a1d5740eef70f03752ef02..20d8509ce3ecc85d20b2b15a4f3e0d21cc6caf77 100644 (file)
@@ -11,7 +11,6 @@ For Rust-Lightning clients which wish to make direct connections to Lightning P2
 
 [dependencies]
 bitcoin = "0.21"
-bitcoin_hashes = "0.7"
 lightning = { version = "0.0.11", path = "../lightning" }
 secp256k1 = "0.15"
 tokio = { version = ">=0.2.12", features = [ "io-util", "macros", "rt-core", "sync", "tcp", "time" ] }
index 96680b56e4788932070fd4ed1840f5abac2a60d0..406e039d62e7957cf689471250f8945c02f5e79d 100644 (file)
@@ -13,7 +13,7 @@ Still missing tons of error-handling. See GitHub issues for suggested projects i
 [features]
 # Supports tracking channels with a non-bitcoin chain hashes. Currently enables all kinds of fun DoS attacks.
 non_bitcoin_chain_hash_routing = []
-fuzztarget = ["secp256k1/fuzztarget", "bitcoin/fuzztarget", "bitcoin_hashes/fuzztarget"]
+fuzztarget = ["secp256k1/fuzztarget", "bitcoin/fuzztarget"]
 # Unlog messages superior at targeted level.
 max_level_off = []
 max_level_error = []
@@ -23,7 +23,6 @@ max_level_debug = []
 
 [dependencies]
 bitcoin = "0.21"
-bitcoin_hashes = "0.7"
 secp256k1 = "0.15"
 
 [dev-dependencies.bitcoin]
index b30ebc1ee1629441ca7ed95e4e27a2518279ad35..f497236552844c65d2039a6847d52a4bc6571364 100644 (file)
@@ -9,7 +9,7 @@ use bitcoin::blockdata::transaction::Transaction;
 use bitcoin::blockdata::script::Script;
 use bitcoin::blockdata::constants::genesis_block;
 use bitcoin::util::hash::BitcoinHash;
-use bitcoin_hashes::sha256d::Hash as Sha256dHash;
+use bitcoin::hashes::sha256d::Hash as Sha256dHash;
 use bitcoin::network::constants::Network;
 
 use util::logger::Logger;
index 73c22684c544459eb8bb2f10e24a405623db4d6a..daee746bed7687553b50bb018e6182223c486aa0 100644 (file)
@@ -9,11 +9,11 @@ use bitcoin::network::constants::Network;
 use bitcoin::util::bip32::{ExtendedPrivKey, ExtendedPubKey, ChildNumber};
 use bitcoin::util::bip143;
 
-use bitcoin_hashes::{Hash, HashEngine};
-use bitcoin_hashes::sha256::HashEngine as Sha256State;
-use bitcoin_hashes::sha256::Hash as Sha256;
-use bitcoin_hashes::sha256d::Hash as Sha256dHash;
-use bitcoin_hashes::hash160::Hash as Hash160;
+use bitcoin::hashes::{Hash, HashEngine};
+use bitcoin::hashes::sha256::HashEngine as Sha256State;
+use bitcoin::hashes::sha256::Hash as Sha256;
+use bitcoin::hashes::sha256d::Hash as Sha256dHash;
+use bitcoin::hashes::hash160::Hash as Hash160;
 
 use secp256k1::key::{SecretKey, PublicKey};
 use secp256k1::{Secp256k1, Signature, Signing};
index 0f479ff91abdff8c12aabb277d149f9b1646a5b1..df45d786bd73d1f3321816e89f0bc24799233fc3 100644 (file)
@@ -1,6 +1,6 @@
 //! Contains simple structs describing parts of transactions on the chain.
 
-use bitcoin_hashes::sha256d::Hash as Sha256dHash;
+use bitcoin::hashes::sha256d::Hash as Sha256dHash;
 use bitcoin::blockdata::transaction::OutPoint as BitcoinOutPoint;
 
 /// A reference to a transaction output.
index 68924b57a36af64b7fc01b43efcb4733ca8f3dc7..431caa6080106cd43064a4979ffbff1643194885 100644 (file)
@@ -19,7 +19,6 @@
 #![allow(ellipsis_inclusive_range_patterns)]
 
 extern crate bitcoin;
-extern crate bitcoin_hashes;
 extern crate secp256k1;
 #[cfg(test)] extern crate rand;
 #[cfg(test)] extern crate hex;
index 62d3103337d828943cba7e59adbd3b78f9f67ba9..fca166b4a6113d3d3c413a8008e8914c4244cc4c 100644 (file)
@@ -8,11 +8,11 @@ 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;
index 4cce9fcd2cd4e00f18043d823472679ba061c796..adf53b0d5f238c99df18a94e03229395437daa3f 100644 (file)
@@ -12,8 +12,8 @@ use ln::msgs::{ChannelMessageHandler, ErrorAction, RoutingMessageHandler};
 use util::events::{Event, EventsProvider, MessageSendEvent, MessageSendEventsProvider};
 use util::errors::APIError;
 
-use bitcoin_hashes::sha256::Hash as Sha256;
-use bitcoin_hashes::Hash;
+use bitcoin::hashes::sha256::Hash as Sha256;
+use bitcoin::hashes::Hash;
 
 use ln::functional_test_utils::*;
 
index 35e688a0d765db059182575134bd39d21f85b86f..68a697ddd76491aff792a540893b64e589264692 100644 (file)
@@ -6,10 +6,10 @@ use bitcoin::util::hash::BitcoinHash;
 use bitcoin::util::bip143;
 use bitcoin::consensus::encode;
 
-use bitcoin_hashes::{Hash, HashEngine};
-use bitcoin_hashes::sha256::Hash as Sha256;
-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::hash160::Hash as Hash160;
+use bitcoin::hashes::sha256d::Hash as Sha256dHash;
 
 use secp256k1::key::{PublicKey,SecretKey};
 use secp256k1::{Secp256k1,Signature};
@@ -4291,7 +4291,7 @@ mod tests {
        use bitcoin::blockdata::constants::genesis_block;
        use bitcoin::blockdata::opcodes;
        use bitcoin::network::constants::Network;
-       use bitcoin_hashes::hex::FromHex;
+       use bitcoin::hashes::hex::FromHex;
        use hex;
        use ln::channelmanager::{HTLCSource, PaymentPreimage, PaymentHash};
        use ln::channel::{Channel,ChannelKeys,InboundHTLCOutput,OutboundHTLCOutput,InboundHTLCState,OutboundHTLCState,HTLCOutputInCommitment,TxCreationKeys};
@@ -4309,10 +4309,10 @@ mod tests {
        use util::logger::Logger;
        use secp256k1::{Secp256k1, Message, Signature, All};
        use secp256k1::key::{SecretKey,PublicKey};
-       use bitcoin_hashes::sha256::Hash as Sha256;
-       use bitcoin_hashes::sha256d::Hash as Sha256dHash;
-       use bitcoin_hashes::hash160::Hash as Hash160;
-       use bitcoin_hashes::Hash;
+       use bitcoin::hashes::sha256::Hash as Sha256;
+       use bitcoin::hashes::sha256d::Hash as Sha256dHash;
+       use bitcoin::hashes::hash160::Hash as Hash160;
+       use bitcoin::hashes::Hash;
        use std::sync::Arc;
        use rand::{thread_rng,Rng};
 
index f347c279f5aa2333cc2914a664beacb1646ad27c..83ff133eb3f3246c495e573e47eee7243a03cd52 100644 (file)
@@ -14,11 +14,11 @@ use bitcoin::blockdata::constants::genesis_block;
 use bitcoin::network::constants::Network;
 use bitcoin::util::hash::BitcoinHash;
 
-use bitcoin_hashes::{Hash, HashEngine};
-use bitcoin_hashes::hmac::{Hmac, HmacEngine};
-use bitcoin_hashes::sha256::Hash as Sha256;
-use bitcoin_hashes::sha256d::Hash as Sha256dHash;
-use bitcoin_hashes::cmp::fixed_time_eq;
+use bitcoin::hashes::{Hash, HashEngine};
+use bitcoin::hashes::hmac::{Hmac, HmacEngine};
+use bitcoin::hashes::sha256::Hash as Sha256;
+use bitcoin::hashes::sha256d::Hash as Sha256dHash;
+use bitcoin::hashes::cmp::fixed_time_eq;
 
 use secp256k1::key::{SecretKey,PublicKey};
 use secp256k1::Secp256k1;
index c417671eca04f40ff7910adce1541b352652966e..86a8591ebbac518079e7209b1ad2bd2bfe4794a4 100644 (file)
@@ -19,10 +19,10 @@ use bitcoin::blockdata::opcodes;
 use bitcoin::consensus::encode;
 use bitcoin::util::hash::BitcoinHash;
 
-use bitcoin_hashes::Hash;
-use bitcoin_hashes::sha256::Hash as Sha256;
-use bitcoin_hashes::hash160::Hash as Hash160;
-use bitcoin_hashes::sha256d::Hash as Sha256dHash;
+use bitcoin::hashes::Hash;
+use bitcoin::hashes::sha256::Hash as Sha256;
+use bitcoin::hashes::hash160::Hash as Hash160;
+use bitcoin::hashes::sha256d::Hash as Sha256dHash;
 
 use secp256k1::{Secp256k1,Signature};
 use secp256k1::key::{SecretKey,PublicKey};
@@ -2518,10 +2518,10 @@ mod tests {
        use bitcoin::blockdata::transaction::{Transaction, TxIn, TxOut, SigHashType};
        use bitcoin::blockdata::transaction::OutPoint as BitcoinOutPoint;
        use bitcoin::util::bip143;
-       use bitcoin_hashes::Hash;
-       use bitcoin_hashes::sha256::Hash as Sha256;
-       use bitcoin_hashes::sha256d::Hash as Sha256dHash;
-       use bitcoin_hashes::hex::FromHex;
+       use bitcoin::hashes::Hash;
+       use bitcoin::hashes::sha256::Hash as Sha256;
+       use bitcoin::hashes::sha256d::Hash as Sha256dHash;
+       use bitcoin::hashes::hex::FromHex;
        use hex;
        use chain::transaction::OutPoint;
        use ln::channelmanager::{PaymentPreimage, PaymentHash};
index 91365d5a29bb6761f5d9a8a30bbda2626954aef2..e59e5339e0bda4bba4adf76d2eee1d8bbb3bcd6e 100644 (file)
@@ -24,9 +24,9 @@ use bitcoin::blockdata::block::BlockHeader;
 use bitcoin::blockdata::transaction::{Transaction, TxOut};
 use bitcoin::network::constants::Network;
 
-use bitcoin_hashes::sha256::Hash as Sha256;
-use bitcoin_hashes::sha256d::Hash as Sha256d;
-use bitcoin_hashes::Hash;
+use bitcoin::hashes::sha256::Hash as Sha256;
+use bitcoin::hashes::sha256d::Hash as Sha256d;
+use bitcoin::hashes::Hash;
 
 use secp256k1::Secp256k1;
 use secp256k1::key::PublicKey;
index 267d4bbdc060c6bdc842c06b081303253b781b17..b91e0f8b7f2272ea8605580940919e3a43ede4b0 100644 (file)
@@ -25,7 +25,7 @@ use util::config::UserConfig;
 use util::logger::Logger;
 
 use bitcoin::util::hash::BitcoinHash;
-use bitcoin_hashes::sha256d::Hash as Sha256dHash;
+use bitcoin::hashes::sha256d::Hash as Sha256dHash;
 use bitcoin::util::bip143;
 use bitcoin::util::address::Address;
 use bitcoin::util::bip32::{ChildNumber, ExtendedPubKey, ExtendedPrivKey};
@@ -36,8 +36,8 @@ use bitcoin::blockdata::opcodes;
 use bitcoin::blockdata::constants::genesis_block;
 use bitcoin::network::constants::Network;
 
-use bitcoin_hashes::sha256::Hash as Sha256;
-use bitcoin_hashes::Hash;
+use bitcoin::hashes::sha256::Hash as Sha256;
+use bitcoin::hashes::Hash;
 
 use secp256k1::{Secp256k1, Message};
 use secp256k1::key::{PublicKey,SecretKey};
index b17b4aa083df31a5d128c1bbc3ebe7d7b643e5b4..310aea52aa76614c087e90edef1dff660896c3da 100644 (file)
@@ -18,7 +18,7 @@
 use secp256k1::key::PublicKey;
 use secp256k1::Signature;
 use secp256k1;
-use bitcoin_hashes::sha256d::Hash as Sha256dHash;
+use bitcoin::hashes::sha256d::Hash as Sha256dHash;
 use bitcoin::blockdata::script::Script;
 
 use ln::features::{ChannelFeatures, InitFeatures, NodeFeatures};
@@ -1360,8 +1360,8 @@ mod tests {
        use ln::channelmanager::{PaymentPreimage, PaymentHash, PaymentSecret};
        use util::ser::{Writeable, Readable};
 
-       use bitcoin_hashes::sha256d::Hash as Sha256dHash;
-       use bitcoin_hashes::hex::FromHex;
+       use bitcoin::hashes::sha256d::Hash as Sha256dHash;
+       use bitcoin::hashes::hex::FromHex;
        use bitcoin::util::address::Address;
        use bitcoin::network::constants::Network;
        use bitcoin::blockdata::script::Builder;
index 49572f2cb8baee6f270778be52a4b92964995116..531f7cd8b624604461564871af642fb525a9eb1c 100644 (file)
@@ -8,7 +8,7 @@ use bitcoin::blockdata::transaction::OutPoint as BitcoinOutPoint;
 use bitcoin::blockdata::script::Script;
 use bitcoin::util::bip143;
 
-use bitcoin_hashes::sha256d::Hash as Sha256dHash;
+use bitcoin::hashes::sha256d::Hash as Sha256dHash;
 
 use secp256k1::{Secp256k1, Signature};
 use secp256k1;
index dc3b2f9022542556e9cc01bba9aa0d757fc85fe8..2783c90c69c61bdf4034888fd27bf6c99eee1415 100644 (file)
@@ -7,10 +7,10 @@ use util::errors::{self, APIError};
 use util::ser::{Readable, Writeable, LengthCalculatingWriter};
 use util::logger::{Logger, LogHolder};
 
-use bitcoin_hashes::{Hash, HashEngine};
-use bitcoin_hashes::cmp::fixed_time_eq;
-use bitcoin_hashes::hmac::{Hmac, HmacEngine};
-use bitcoin_hashes::sha256::Hash as Sha256;
+use bitcoin::hashes::{Hash, HashEngine};
+use bitcoin::hashes::cmp::fixed_time_eq;
+use bitcoin::hashes::hmac::{Hmac, HmacEngine};
+use bitcoin::hashes::sha256::Hash as Sha256;
 
 use secp256k1::key::{SecretKey,PublicKey};
 use secp256k1::Secp256k1;
index 7e84e329eb1482bbeb9e08f1165ad1ddf93432fd..9585887d5dbd12fcf3babe8edaf8db36b2fc44a5 100644 (file)
@@ -1,8 +1,8 @@
 use ln::msgs::LightningError;
 use ln::msgs;
 
-use bitcoin_hashes::{Hash, HashEngine, Hmac, HmacEngine};
-use bitcoin_hashes::sha256::Hash as Sha256;
+use bitcoin::hashes::{Hash, HashEngine, Hmac, HmacEngine};
+use bitcoin::hashes::sha256::Hash as Sha256;
 
 use secp256k1::Secp256k1;
 use secp256k1::key::{PublicKey,SecretKey};
index 15fa105d0c0465e5d3dd27ac421bca59e8004f91..8005a40c10d2c220e921067f2a4796cf79ebec8f 100644 (file)
@@ -26,9 +26,9 @@ use std::sync::atomic::{AtomicUsize, Ordering};
 use std::{cmp,error,hash,fmt};
 use std::ops::Deref;
 
-use bitcoin_hashes::sha256::Hash as Sha256;
-use bitcoin_hashes::sha256::HashEngine as Sha256Engine;
-use bitcoin_hashes::{HashEngine, Hash};
+use bitcoin::hashes::sha256::Hash as Sha256;
+use bitcoin::hashes::sha256::HashEngine as Sha256Engine;
+use bitcoin::hashes::{HashEngine, Hash};
 
 /// Provides references to trait impls which handle different types of messages.
 pub struct MessageHandler<CM: Deref> where CM::Target: msgs::ChannelMessageHandler {
index c7ebe86d7eb0d9b607c68b3831a990e76e61468e..bdb6f9828a486a71bc3c2f365aa138e97f5fd2d8 100644 (file)
@@ -7,8 +7,8 @@ use secp256k1::key::PublicKey;
 use secp256k1::Secp256k1;
 use secp256k1;
 
-use bitcoin_hashes::sha256d::Hash as Sha256dHash;
-use bitcoin_hashes::Hash;
+use bitcoin::hashes::sha256d::Hash as Sha256dHash;
+use bitcoin::hashes::Hash;
 use bitcoin::blockdata::script::Builder;
 use bitcoin::blockdata::opcodes;
 
@@ -1085,8 +1085,8 @@ mod tests {
        use util::logger::Logger;
        use util::ser::{Writeable, Readable};
 
-       use bitcoin_hashes::sha256d::Hash as Sha256dHash;
-       use bitcoin_hashes::Hash;
+       use bitcoin::hashes::sha256d::Hash as Sha256dHash;
+       use bitcoin::hashes::Hash;
        use bitcoin::network::constants::Network;
        use bitcoin::blockdata::constants::genesis_block;
        use bitcoin::blockdata::script::Builder;
index 1d3af1ea32072b4622756dcb8ef292921293904b..622af70acde6d0ebca871df2c812c78c53f3595b 100644 (file)
@@ -14,7 +14,7 @@
 mod real_chachapoly {
        use util::chacha20::ChaCha20;
        use util::poly1305::Poly1305;
-       use bitcoin_hashes::cmp::fixed_time_eq;
+       use bitcoin::hashes::cmp::fixed_time_eq;
 
        use util::byte_utils;
 
index bee0f0d26f9a68e3ea4b00635ddd3994781c28c0..f02fced7fd86f1ce6febd315d3f7367182f83fdf 100644 (file)
@@ -1,7 +1,7 @@
 use chain::transaction::OutPoint;
 use chain::keysinterface::SpendableOutputDescriptor;
 
-use bitcoin_hashes::sha256d::Hash as Sha256dHash;
+use bitcoin::hashes::sha256d::Hash as Sha256dHash;
 use bitcoin::blockdata::transaction::Transaction;
 use secp256k1::key::PublicKey;
 
index 5a68f7a5eb4164a43753630d4e7015b712ac2f37..0f05dfe1afa81245724cb54fccb9cda8d5a377bc 100644 (file)
@@ -14,7 +14,7 @@ use bitcoin::blockdata::script::Script;
 use bitcoin::blockdata::transaction::{OutPoint, Transaction, TxOut};
 use bitcoin::consensus;
 use bitcoin::consensus::Encodable;
-use bitcoin_hashes::sha256d::Hash as Sha256dHash;
+use bitcoin::hashes::sha256d::Hash as Sha256dHash;
 use std::marker::Sized;
 use ln::msgs::DecodeError;
 use ln::channelmanager::{PaymentPreimage, PaymentHash, PaymentSecret};
@@ -542,7 +542,7 @@ impl Writeable for Sha256dHash {
 
 impl Readable for Sha256dHash {
        fn read<R: Read>(r: &mut R) -> Result<Self, DecodeError> {
-               use bitcoin_hashes::Hash;
+               use bitcoin::hashes::Hash;
 
                let buf: [u8; 32] = Readable::read(r)?;
                Ok(Sha256dHash::from_slice(&buf[..]).unwrap())
index 905a53e6648c247022f7163c4d98819394b307e9..658e8b58eda5093bf8c0b4630d39a963c4b8dcb3 100644 (file)
@@ -16,7 +16,7 @@ use bitcoin::blockdata::transaction::Transaction;
 use bitcoin::blockdata::script::{Builder, Script};
 use bitcoin::blockdata::block::Block;
 use bitcoin::blockdata::opcodes;
-use bitcoin_hashes::sha256d::Hash as Sha256dHash;
+use bitcoin::hashes::sha256d::Hash as Sha256dHash;
 use bitcoin::network::constants::Network;
 
 use secp256k1::{SecretKey, PublicKey};