@@ -2408,7 +2408,7 @@ impl<Signer: WriteableEcdsaChannelSigner> ChannelMonitorImpl<Signer> {
2408
2408
let commitment_package = PackageTemplate :: build_package (
2409
2409
self . funding_info . 0 . txid . clone ( ) , self . funding_info . 0 . index as u32 ,
2410
2410
PackageSolvingData :: HolderFundingOutput ( funding_output) ,
2411
- best_block_height, false , best_block_height,
2411
+ best_block_height, best_block_height
2412
2412
) ;
2413
2413
self . onchain_tx_handler . update_claims_view_from_requests (
2414
2414
vec ! [ commitment_package] , best_block_height, best_block_height,
@@ -2591,8 +2591,7 @@ impl<Signer: WriteableEcdsaChannelSigner> ChannelMonitorImpl<Signer> {
2591
2591
if outp. script_pubkey == revokeable_p2wsh {
2592
2592
let revk_outp = RevokedOutput :: build ( per_commitment_point, self . counterparty_commitment_params . counterparty_delayed_payment_base_key , self . counterparty_commitment_params . counterparty_htlc_base_key , per_commitment_key, outp. value , self . counterparty_commitment_params . on_counterparty_tx_csv , self . onchain_tx_handler . opt_anchors ( ) , true ) ;
2593
2593
// Post-anchor, aggregation of outputs of different types is unsafe. See https://github.com/lightning/bolts/pull/803.
2594
- let aggregation = if self . onchain_tx_handler . opt_anchors ( ) { false } else { true } ;
2595
- let justice_package = PackageTemplate :: build_package ( commitment_txid, idx as u32 , PackageSolvingData :: RevokedOutput ( revk_outp) , height + self . counterparty_commitment_params . on_counterparty_tx_csv as u32 , aggregation, height) ;
2594
+ let justice_package = PackageTemplate :: build_package ( commitment_txid, idx as u32 , PackageSolvingData :: RevokedOutput ( revk_outp) , height + self . counterparty_commitment_params . on_counterparty_tx_csv as u32 , height) ;
2596
2595
claimable_outpoints. push ( justice_package) ;
2597
2596
to_counterparty_output_info =
2598
2597
Some ( ( idx. try_into ( ) . expect ( "Txn can't have more than 2^32 outputs" ) , outp. value ) ) ;
@@ -2610,7 +2609,7 @@ impl<Signer: WriteableEcdsaChannelSigner> ChannelMonitorImpl<Signer> {
2610
2609
to_counterparty_output_info) ;
2611
2610
}
2612
2611
let revk_htlc_outp = RevokedHTLCOutput :: build ( per_commitment_point, self . counterparty_commitment_params . counterparty_delayed_payment_base_key , self . counterparty_commitment_params . counterparty_htlc_base_key , per_commitment_key, htlc. amount_msat / 1000 , htlc. clone ( ) , self . onchain_tx_handler . channel_transaction_parameters . opt_anchors . is_some ( ) ) ;
2613
- let justice_package = PackageTemplate :: build_package ( commitment_txid, transaction_output_index, PackageSolvingData :: RevokedHTLCOutput ( revk_htlc_outp) , htlc. cltv_expiry , true , height) ;
2612
+ let justice_package = PackageTemplate :: build_package ( commitment_txid, transaction_output_index, PackageSolvingData :: RevokedHTLCOutput ( revk_htlc_outp) , htlc. cltv_expiry , height) ;
2614
2613
claimable_outpoints. push ( justice_package) ;
2615
2614
}
2616
2615
}
@@ -2735,8 +2734,7 @@ impl<Signer: WriteableEcdsaChannelSigner> ChannelMonitorImpl<Signer> {
2735
2734
self . counterparty_commitment_params . counterparty_htlc_base_key ,
2736
2735
htlc. clone ( ) , self . onchain_tx_handler . opt_anchors ( ) ) )
2737
2736
} ;
2738
- let aggregation = if !htlc. offered { false } else { true } ;
2739
- let counterparty_package = PackageTemplate :: build_package ( commitment_txid, transaction_output_index, counterparty_htlc_outp, htlc. cltv_expiry , aggregation, 0 ) ;
2737
+ let counterparty_package = PackageTemplate :: build_package ( commitment_txid, transaction_output_index, counterparty_htlc_outp, htlc. cltv_expiry , 0 ) ;
2740
2738
claimable_outpoints. push ( counterparty_package) ;
2741
2739
}
2742
2740
}
@@ -2780,7 +2778,7 @@ impl<Signer: WriteableEcdsaChannelSigner> ChannelMonitorImpl<Signer> {
2780
2778
) ;
2781
2779
let justice_package = PackageTemplate :: build_package (
2782
2780
htlc_txid, idx as u32 , PackageSolvingData :: RevokedOutput ( revk_outp) ,
2783
- height + self . counterparty_commitment_params . on_counterparty_tx_csv as u32 , true , height
2781
+ height + self . counterparty_commitment_params . on_counterparty_tx_csv as u32 , height
2784
2782
) ;
2785
2783
claimable_outpoints. push ( justice_package) ;
2786
2784
if outputs_to_watch. is_none ( ) {
@@ -2803,11 +2801,11 @@ impl<Signer: WriteableEcdsaChannelSigner> ChannelMonitorImpl<Signer> {
2803
2801
2804
2802
for & ( ref htlc, _, _) in holder_tx. htlc_outputs . iter ( ) {
2805
2803
if let Some ( transaction_output_index) = htlc. transaction_output_index {
2806
- let ( htlc_output, aggregable ) = if htlc. offered {
2804
+ let htlc_output = if htlc. offered {
2807
2805
let htlc_output = HolderHTLCOutput :: build_offered (
2808
2806
htlc. amount_msat , htlc. cltv_expiry , self . onchain_tx_handler . opt_anchors ( )
2809
2807
) ;
2810
- ( htlc_output, false )
2808
+ htlc_output
2811
2809
} else {
2812
2810
let payment_preimage = if let Some ( preimage) = self . payment_preimages . get ( & htlc. payment_hash ) {
2813
2811
preimage. clone ( )
@@ -2818,12 +2816,12 @@ impl<Signer: WriteableEcdsaChannelSigner> ChannelMonitorImpl<Signer> {
2818
2816
let htlc_output = HolderHTLCOutput :: build_accepted (
2819
2817
payment_preimage, htlc. amount_msat , self . onchain_tx_handler . opt_anchors ( )
2820
2818
) ;
2821
- ( htlc_output, self . onchain_tx_handler . opt_anchors ( ) )
2819
+ htlc_output
2822
2820
} ;
2823
2821
let htlc_package = PackageTemplate :: build_package (
2824
2822
holder_tx. txid , transaction_output_index,
2825
2823
PackageSolvingData :: HolderHTLCOutput ( htlc_output) ,
2826
- htlc. cltv_expiry , aggregable , conf_height
2824
+ htlc. cltv_expiry , conf_height
2827
2825
) ;
2828
2826
claim_requests. push ( htlc_package) ;
2829
2827
}
@@ -3163,7 +3161,7 @@ impl<Signer: WriteableEcdsaChannelSigner> ChannelMonitorImpl<Signer> {
3163
3161
let should_broadcast = self . should_broadcast_holder_commitment_txn ( logger) ;
3164
3162
if should_broadcast {
3165
3163
let funding_outp = HolderFundingOutput :: build ( self . funding_redeemscript . clone ( ) , self . channel_value_satoshis , self . onchain_tx_handler . opt_anchors ( ) ) ;
3166
- let commitment_package = PackageTemplate :: build_package ( self . funding_info . 0 . txid . clone ( ) , self . funding_info . 0 . index as u32 , PackageSolvingData :: HolderFundingOutput ( funding_outp) , self . best_block . height ( ) , false , self . best_block . height ( ) ) ;
3164
+ let commitment_package = PackageTemplate :: build_package ( self . funding_info . 0 . txid . clone ( ) , self . funding_info . 0 . index as u32 , PackageSolvingData :: HolderFundingOutput ( funding_outp) , self . best_block . height ( ) , self . best_block . height ( ) ) ;
3167
3165
claimable_outpoints. push ( commitment_package) ;
3168
3166
self . pending_monitor_events . push ( MonitorEvent :: CommitmentTxConfirmed ( self . funding_info . 0 ) ) ;
3169
3167
let commitment_tx = self . onchain_tx_handler . get_fully_signed_holder_tx ( & self . funding_redeemscript ) ;
0 commit comments