Skip to content

Commit 292b2cc

Browse files
committed
Increase visibility of anchor related methods
1 parent 15746da commit 292b2cc

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lightning/src/ln/chan_utils.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,7 @@ pub(crate) fn get_to_countersignatory_with_anchors_redeemscript(payment_point: &
636636
/// <>
637637
/// (empty vector required to satisfy compliance with MINIMALIF-standard rule)
638638
#[inline]
639-
pub(crate) fn get_anchor_redeemscript(funding_pubkey: &PublicKey) -> Script {
639+
pub fn get_anchor_redeemscript(funding_pubkey: &PublicKey) -> Script {
640640
Builder::new().push_slice(&funding_pubkey.serialize()[..])
641641
.push_opcode(opcodes::all::OP_CHECKSIG)
642642
.push_opcode(opcodes::all::OP_IFDUP)
@@ -774,6 +774,11 @@ impl<'a> DirectedChannelTransactionParameters<'a> {
774774
pub fn funding_outpoint(&self) -> OutPoint {
775775
self.inner.funding_outpoint.unwrap().into_bitcoin_outpoint()
776776
}
777+
778+
/// Whether to use anchors for this channel
779+
pub fn opt_anchors(&self) -> bool {
780+
self.inner.opt_anchors.is_some()
781+
}
777782
}
778783

779784
/// Information needed to build and sign a holder's commitment transaction.

0 commit comments

Comments
 (0)