From c077f36b4b231b05b9c6bfadd5ef0c017b17eaa0 Mon Sep 17 00:00:00 2001 From: Ken Sedgwick Date: Mon, 15 Nov 2021 18:50:57 -0800 Subject: [PATCH] Increase visibility of anchor related methods --- lightning/src/ln/chan_utils.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lightning/src/ln/chan_utils.rs b/lightning/src/ln/chan_utils.rs index 80dd872a..0db036d3 100644 --- a/lightning/src/ln/chan_utils.rs +++ b/lightning/src/ln/chan_utils.rs @@ -636,7 +636,7 @@ pub(crate) fn get_to_countersignatory_with_anchors_redeemscript(payment_point: & /// <> /// (empty vector required to satisfy compliance with MINIMALIF-standard rule) #[inline] -pub(crate) fn get_anchor_redeemscript(funding_pubkey: &PublicKey) -> Script { +pub fn get_anchor_redeemscript(funding_pubkey: &PublicKey) -> Script { Builder::new().push_slice(&funding_pubkey.serialize()[..]) .push_opcode(opcodes::all::OP_CHECKSIG) .push_opcode(opcodes::all::OP_IFDUP) @@ -774,6 +774,11 @@ impl<'a> DirectedChannelTransactionParameters<'a> { pub fn funding_outpoint(&self) -> OutPoint { self.inner.funding_outpoint.unwrap().into_bitcoin_outpoint() } + + /// Whether to use anchors for this channel + pub fn opt_anchors(&self) -> bool { + self.inner.opt_anchors.is_some() + } } /// Information needed to build and sign a holder's commitment transaction. -- 2.30.2