@@ -2422,7 +2422,7 @@ impl<Signer: WriteableEcdsaChannelSigner> ChannelMonitorImpl<Signer> {
2422
2422
let commitment_package = PackageTemplate :: build_package (
2423
2423
self . funding_info . 0 . txid . clone ( ) , self . funding_info . 0 . index as u32 ,
2424
2424
PackageSolvingData :: HolderFundingOutput ( funding_output) ,
2425
- best_block_height, false , best_block_height,
2425
+ best_block_height, best_block_height
2426
2426
) ;
2427
2427
self . onchain_tx_handler . update_claims_view_from_requests (
2428
2428
vec ! [ commitment_package] , best_block_height, best_block_height,
@@ -2605,8 +2605,7 @@ impl<Signer: WriteableEcdsaChannelSigner> ChannelMonitorImpl<Signer> {
2605
2605
if outp. script_pubkey == revokeable_p2wsh {
2606
2606
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 ) ;
2607
2607
// Post-anchor, aggregation of outputs of different types is unsafe. See https://github.com/lightning/bolts/pull/803.
2608
- let aggregation = if self . onchain_tx_handler . opt_anchors ( ) { false } else { true } ;
2609
- 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) ;
2608
+ 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) ;
2610
2609
claimable_outpoints. push ( justice_package) ;
2611
2610
to_counterparty_output_info =
2612
2611
Some ( ( idx. try_into ( ) . expect ( "Txn can't have more than 2^32 outputs" ) , outp. value ) ) ;
@@ -2624,7 +2623,7 @@ impl<Signer: WriteableEcdsaChannelSigner> ChannelMonitorImpl<Signer> {
2624
2623
to_counterparty_output_info) ;
2625
2624
}
2626
2625
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 ( ) ) ;
2627
- let justice_package = PackageTemplate :: build_package ( commitment_txid, transaction_output_index, PackageSolvingData :: RevokedHTLCOutput ( revk_htlc_outp) , htlc. cltv_expiry , true , height) ;
2626
+ let justice_package = PackageTemplate :: build_package ( commitment_txid, transaction_output_index, PackageSolvingData :: RevokedHTLCOutput ( revk_htlc_outp) , htlc. cltv_expiry , height) ;
2628
2627
claimable_outpoints. push ( justice_package) ;
2629
2628
}
2630
2629
}
@@ -2749,8 +2748,7 @@ impl<Signer: WriteableEcdsaChannelSigner> ChannelMonitorImpl<Signer> {
2749
2748
self . counterparty_commitment_params . counterparty_htlc_base_key ,
2750
2749
htlc. clone ( ) , self . onchain_tx_handler . opt_anchors ( ) ) )
2751
2750
} ;
2752
- let aggregation = if !htlc. offered { false } else { true } ;
2753
- let counterparty_package = PackageTemplate :: build_package ( commitment_txid, transaction_output_index, counterparty_htlc_outp, htlc. cltv_expiry , aggregation, 0 ) ;
2751
+ let counterparty_package = PackageTemplate :: build_package ( commitment_txid, transaction_output_index, counterparty_htlc_outp, htlc. cltv_expiry , 0 ) ;
2754
2752
claimable_outpoints. push ( counterparty_package) ;
2755
2753
}
2756
2754
}
@@ -2794,7 +2792,7 @@ impl<Signer: WriteableEcdsaChannelSigner> ChannelMonitorImpl<Signer> {
2794
2792
) ;
2795
2793
let justice_package = PackageTemplate :: build_package (
2796
2794
htlc_txid, idx as u32 , PackageSolvingData :: RevokedOutput ( revk_outp) ,
2797
- height + self . counterparty_commitment_params . on_counterparty_tx_csv as u32 , true , height
2795
+ height + self . counterparty_commitment_params . on_counterparty_tx_csv as u32 , height
2798
2796
) ;
2799
2797
claimable_outpoints. push ( justice_package) ;
2800
2798
if outputs_to_watch. is_none ( ) {
@@ -2817,11 +2815,11 @@ impl<Signer: WriteableEcdsaChannelSigner> ChannelMonitorImpl<Signer> {
2817
2815
2818
2816
for & ( ref htlc, _, _) in holder_tx. htlc_outputs . iter ( ) {
2819
2817
if let Some ( transaction_output_index) = htlc. transaction_output_index {
2820
- let ( htlc_output, aggregable ) = if htlc. offered {
2818
+ let htlc_output = if htlc. offered {
2821
2819
let htlc_output = HolderHTLCOutput :: build_offered (
2822
2820
htlc. amount_msat , htlc. cltv_expiry , self . onchain_tx_handler . opt_anchors ( )
2823
2821
) ;
2824
- ( htlc_output, false )
2822
+ htlc_output
2825
2823
} else {
2826
2824
let payment_preimage = if let Some ( preimage) = self . payment_preimages . get ( & htlc. payment_hash ) {
2827
2825
preimage. clone ( )
@@ -2832,12 +2830,12 @@ impl<Signer: WriteableEcdsaChannelSigner> ChannelMonitorImpl<Signer> {
2832
2830
let htlc_output = HolderHTLCOutput :: build_accepted (
2833
2831
payment_preimage, htlc. amount_msat , self . onchain_tx_handler . opt_anchors ( )
2834
2832
) ;
2835
- ( htlc_output, self . onchain_tx_handler . opt_anchors ( ) )
2833
+ htlc_output
2836
2834
} ;
2837
2835
let htlc_package = PackageTemplate :: build_package (
2838
2836
holder_tx. txid , transaction_output_index,
2839
2837
PackageSolvingData :: HolderHTLCOutput ( htlc_output) ,
2840
- htlc. cltv_expiry , aggregable , conf_height
2838
+ htlc. cltv_expiry , conf_height
2841
2839
) ;
2842
2840
claim_requests. push ( htlc_package) ;
2843
2841
}
@@ -3177,7 +3175,7 @@ impl<Signer: WriteableEcdsaChannelSigner> ChannelMonitorImpl<Signer> {
3177
3175
let should_broadcast = self . should_broadcast_holder_commitment_txn ( logger) ;
3178
3176
if should_broadcast {
3179
3177
let funding_outp = HolderFundingOutput :: build ( self . funding_redeemscript . clone ( ) , self . channel_value_satoshis , self . onchain_tx_handler . opt_anchors ( ) ) ;
3180
- 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 ( ) ) ;
3178
+ 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 ( ) ) ;
3181
3179
claimable_outpoints. push ( commitment_package) ;
3182
3180
self . pending_monitor_events . push ( MonitorEvent :: CommitmentTxConfirmed ( self . funding_info . 0 ) ) ;
3183
3181
let commitment_tx = self . onchain_tx_handler . get_fully_signed_holder_tx ( & self . funding_redeemscript ) ;
0 commit comments