X-Git-Url: http://git.bitcoin.ninja/index.cgi?p=rust-lightning;a=blobdiff_plain;f=lightning%2Fsrc%2Fln%2Fchan_utils.rs;h=9be3f38a78e6c027c7328a6d5e6c35e69013c8bd;hp=d833eca91c5fcf185f347bf88f788cb6b1dff20e;hb=dde344a51d431ef013cb7ebb3df0c765dd9ef8be;hpb=27079e04d7b542058e48cafaf5c2e7114b3b8e15 diff --git a/lightning/src/ln/chan_utils.rs b/lightning/src/ln/chan_utils.rs index d833eca9..9be3f38a 100644 --- a/lightning/src/ln/chan_utils.rs +++ b/lightning/src/ln/chan_utils.rs @@ -11,8 +11,7 @@ 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::hash_types::Txid; +use bitcoin::hash_types::{Txid, PubkeyHash}; use ln::channelmanager::{PaymentHash, PaymentPreimage}; use ln::msgs::DecodeError; @@ -364,7 +363,7 @@ pub(crate) fn get_htlc_redeemscript_with_explicit_keys(htlc: &HTLCOutputInCommit if htlc.offered { Builder::new().push_opcode(opcodes::all::OP_DUP) .push_opcode(opcodes::all::OP_HASH160) - .push_slice(&Hash160::hash(&revocation_key.serialize())[..]) + .push_slice(&PubkeyHash::hash(&revocation_key.serialize())[..]) .push_opcode(opcodes::all::OP_EQUAL) .push_opcode(opcodes::all::OP_IF) .push_opcode(opcodes::all::OP_CHECKSIG) @@ -392,7 +391,7 @@ pub(crate) fn get_htlc_redeemscript_with_explicit_keys(htlc: &HTLCOutputInCommit } else { Builder::new().push_opcode(opcodes::all::OP_DUP) .push_opcode(opcodes::all::OP_HASH160) - .push_slice(&Hash160::hash(&revocation_key.serialize())[..]) + .push_slice(&PubkeyHash::hash(&revocation_key.serialize())[..]) .push_opcode(opcodes::all::OP_EQUAL) .push_opcode(opcodes::all::OP_IF) .push_opcode(opcodes::all::OP_CHECKSIG)