X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=src%2Fln%2Fchan_utils.rs;h=0cace11c1cb0dd601474229d738a23526ed6029d;hb=6ab31a0d501db9fd96436deff190da8801ac73b7;hp=45f674377307f362fecac115a4ba90d32c97cf4b;hpb=3057df26566f9b111db0470563689f5633ebfaec;p=rust-lightning diff --git a/src/ln/chan_utils.rs b/src/ln/chan_utils.rs index 45f67437..0cace11c 100644 --- a/src/ln/chan_utils.rs +++ b/src/ln/chan_utils.rs @@ -140,18 +140,18 @@ impl TxCreationKeys { /// the revocation key pub fn get_revokeable_redeemscript(revocation_key: &PublicKey, to_self_delay: u16, delayed_payment_key: &PublicKey) -> Script { Builder::new().push_opcode(opcodes::All::OP_IF) - .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_DROP) - .push_slice(&delayed_payment_key.serialize()) - .push_opcode(opcodes::All::OP_ENDIF) - .push_opcode(opcodes::All::OP_CHECKSIG) - .into_script() + .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_DROP) + .push_slice(&delayed_payment_key.serialize()) + .push_opcode(opcodes::All::OP_ENDIF) + .push_opcode(opcodes::All::OP_CHECKSIG) + .into_script() } -#[derive(Clone)] +#[derive(Clone, PartialEq)] pub struct HTLCOutputInCommitment { pub offered: bool, pub amount_msat: u64,