Add init height in ChannelManager constructor
[rust-lightning] / src / ln / chan_utils.rs
index e7945a508b426351e3633ed900225b566a6b5271..1d8dd30760f4b7384ec247a5bfae1f6482d523a7 100644 (file)
@@ -1,12 +1,12 @@
 use bitcoin::blockdata::script::{Script,Builder};
 use bitcoin::blockdata::opcodes;
 use bitcoin::blockdata::transaction::{TxIn,TxOut,OutPoint,Transaction};
-use bitcoin::util::hash::{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;
 
@@ -133,7 +133,7 @@ pub fn get_revokeable_redeemscript(revocation_key: &PublicKey, to_self_delay: u1
                      .push_slice(&revocation_key.serialize())
                      .push_opcode(opcodes::all::OP_ELSE)
                      .push_int(to_self_delay as i64)
-                     .push_opcode(opcodes::OP_CSV)
+                     .push_opcode(opcodes::all::OP_CSV)
                      .push_opcode(opcodes::all::OP_DROP)
                      .push_slice(&delayed_payment_key.serialize())
                      .push_opcode(opcodes::all::OP_ENDIF)
@@ -206,7 +206,7 @@ pub fn get_htlc_redeemscript_with_explicit_keys(htlc: &HTLCOutputInCommitment, a
                              .push_opcode(opcodes::all::OP_ELSE)
                              .push_opcode(opcodes::all::OP_DROP)
                              .push_int(htlc.cltv_expiry as i64)
-                             .push_opcode(opcodes::OP_CLTV)
+                             .push_opcode(opcodes::all::OP_CLTV)
                              .push_opcode(opcodes::all::OP_DROP)
                              .push_opcode(opcodes::all::OP_CHECKSIG)
                              .push_opcode(opcodes::all::OP_ENDIF)