use bitcoin::hashes::sha256d::Hash as Sha256dHash;
use bitcoin::hashes::Hash;
+use bitcoin::hash_types::BlockHash;
use bitcoin::blockdata::script::Builder;
use bitcoin::blockdata::opcodes;
impl NetworkMap {
#[cfg(feature = "non_bitcoin_chain_hash_routing")]
#[inline]
- fn get_key(short_channel_id: u64, chain_hash: Sha256dHash) -> (u64, Sha256dHash) {
+ fn get_key(short_channel_id: u64, chain_hash: BlockHash) -> (u64, BlockHash) {
(short_channel_id, chain_hash)
}
#[cfg(not(feature = "non_bitcoin_chain_hash_routing"))]
#[inline]
- fn get_key(short_channel_id: u64, _: Sha256dHash) -> u64 {
+ fn get_key(short_channel_id: u64, _: BlockHash) -> u64 {
short_channel_id
}
#[cfg(feature = "non_bitcoin_chain_hash_routing")]
#[inline]
- fn get_short_id(id: &(u64, Sha256dHash)) -> &u64 {
+ fn get_short_id(id: &(u64, BlockHash)) -> &u64 {
&id.0
}
use bitcoin::hashes::sha256d::Hash as Sha256dHash;
use bitcoin::hashes::Hash;
+ use bitcoin::hash_types::BlockHash;
use bitcoin::network::constants::Network;
use bitcoin::blockdata::constants::genesis_block;
use bitcoin::blockdata::script::Builder;
let node7 = PublicKey::from_secret_key(&secp_ctx, &SecretKey::from_slice(&hex::decode("0808080808080808080808080808080808080808080808080808080808080808").unwrap()[..]).unwrap());
let node8 = PublicKey::from_secret_key(&secp_ctx, &SecretKey::from_slice(&hex::decode("0909090909090909090909090909090909090909090909090909090909090909").unwrap()[..]).unwrap());
- let zero_hash = Sha256dHash::hash(&[0; 32]);
+ let zero_hash = BlockHash::hash(&[0; 32]);
macro_rules! id_to_feature_flags {
// Set the feature flags to the id'th odd (ie non-required) feature bit so that we can