@@ -41,7 +41,6 @@ use bitcoin::{secp256k1, Sequence, Witness};
41
41
42
42
use crate :: io;
43
43
use core:: cmp;
44
- use crate :: ln:: chan_utils;
45
44
use crate :: util:: transaction_utils:: sort_outputs;
46
45
use crate :: ln:: channel:: { INITIAL_COMMITMENT_NUMBER , ANCHOR_OUTPUT_VALUE_SATOSHI } ;
47
46
use core:: ops:: Deref ;
@@ -810,15 +809,15 @@ pub fn get_anchor_redeemscript(funding_pubkey: &PublicKey) -> ScriptBuf {
810
809
811
810
/// Locates the output with an anchor script paying to `funding_pubkey` within `commitment_tx`.
812
811
pub ( crate ) fn get_anchor_output < ' a > ( commitment_tx : & ' a Transaction , funding_pubkey : & PublicKey ) -> Option < ( u32 , & ' a TxOut ) > {
813
- let anchor_script = chan_utils :: get_anchor_redeemscript ( funding_pubkey) . to_p2wsh ( ) ;
812
+ let anchor_script = get_anchor_redeemscript ( funding_pubkey) . to_p2wsh ( ) ;
814
813
commitment_tx. output . iter ( ) . enumerate ( )
815
814
. find ( |( _, txout) | txout. script_pubkey == anchor_script)
816
815
. map ( |( idx, txout) | ( idx as u32 , txout) )
817
816
}
818
817
819
818
/// Returns the witness required to satisfy and spend an anchor input.
820
819
pub fn build_anchor_input_witness ( funding_key : & PublicKey , funding_sig : & Signature ) -> Witness {
821
- let anchor_redeem_script = chan_utils :: get_anchor_redeemscript ( funding_key) ;
820
+ let anchor_redeem_script = get_anchor_redeemscript ( funding_key) ;
822
821
let mut ret = Witness :: new ( ) ;
823
822
ret. push_ecdsa_signature ( & BitcoinSignature :: sighash_all ( * funding_sig) ) ;
824
823
ret. push ( anchor_redeem_script. as_bytes ( ) ) ;
@@ -1510,7 +1509,7 @@ impl CommitmentTransaction {
1510
1509
1511
1510
let mut htlcs = Vec :: with_capacity ( htlcs_with_aux. len ( ) ) ;
1512
1511
for ( htlc, _) in htlcs_with_aux {
1513
- let script = chan_utils :: get_htlc_redeemscript ( & htlc, & channel_parameters. channel_type_features ( ) , & keys) ;
1512
+ let script = get_htlc_redeemscript ( & htlc, & channel_parameters. channel_type_features ( ) , & keys) ;
1514
1513
let txout = TxOut {
1515
1514
script_pubkey : script. to_p2wsh ( ) ,
1516
1515
value : htlc. to_bitcoin_amount ( ) ,
@@ -1733,7 +1732,7 @@ impl<'a> TrustedCommitmentTransaction<'a> {
1733
1732
& self . inner . htlcs [ htlc_index] , & self . channel_type_features , & keys. broadcaster_htlc_key ,
1734
1733
& keys. countersignatory_htlc_key , & keys. revocation_key
1735
1734
) ;
1736
- chan_utils :: build_htlc_input_witness (
1735
+ build_htlc_input_witness (
1737
1736
signature, counterparty_signature, preimage, & htlc_redeemscript, & self . channel_type_features ,
1738
1737
)
1739
1738
}
0 commit comments