Skip to content

Commit d9e2bf8

Browse files
committed
Increased visibility of anchor related methods
1 parent f4770a3 commit d9e2bf8

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Diff for: lightning/src/ln/chan_utils.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,7 @@ pub(crate) fn get_to_countersignatory_with_anchors_redeemscript(payment_point: &
638638
/// <>
639639
/// (empty vector required to satisfy compliance with MINIMALIF-standard rule)
640640
#[inline]
641-
pub(crate) fn get_anchor_redeemscript(funding_pubkey: &PublicKey) -> Script {
641+
pub fn get_anchor_redeemscript(funding_pubkey: &PublicKey) -> Script {
642642
Builder::new().push_slice(&funding_pubkey.serialize()[..])
643643
.push_opcode(opcodes::all::OP_CHECKSIG)
644644
.push_opcode(opcodes::all::OP_IFDUP)
@@ -776,6 +776,11 @@ impl<'a> DirectedChannelTransactionParameters<'a> {
776776
pub fn funding_outpoint(&self) -> OutPoint {
777777
self.inner.funding_outpoint.unwrap().into_bitcoin_outpoint()
778778
}
779+
780+
/// Whether to use anchors for this channel
781+
pub fn opt_anchors(&self) -> bool {
782+
self.inner.opt_anchors.is_some()
783+
}
779784
}
780785

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

0 commit comments

Comments
 (0)