@@ -878,6 +878,7 @@ pub(crate) struct ChannelMonitorImpl<Signer: ChannelSigner> {
878
878
prev_counterparty_commitment_txid : Option < Txid > ,
879
879
880
880
counterparty_commitment_params : CounterpartyCommitmentParameters ,
881
+ // this field is not used, but kept for backwards compatibility
881
882
funding_redeemscript : ScriptBuf ,
882
883
channel_value_satoshis : u64 ,
883
884
// first is the idx of the first of the two per-commitment points
@@ -1340,7 +1341,7 @@ impl<Signer: ChannelSigner> ChannelMonitor<Signer> {
1340
1341
pub ( crate ) fn new ( secp_ctx : Secp256k1 < secp256k1:: All > , mut keys : Signer , shutdown_script : Option < ScriptBuf > ,
1341
1342
on_counterparty_tx_csv : u16 , destination_script : & Script , funding_info : ( OutPoint , ScriptBuf ) ,
1342
1343
channel_parameters : & ChannelTransactionParameters , holder_pays_commitment_tx_fee : bool ,
1343
- funding_redeemscript : ScriptBuf , channel_value_satoshis : u64 ,
1344
+ channel_value_satoshis : u64 ,
1344
1345
commitment_transaction_number_obscure_factor : u64 ,
1345
1346
initial_holder_commitment_tx : HolderCommitmentTransaction ,
1346
1347
best_block : BestBlock , counterparty_node_id : PublicKey , channel_id : ChannelId ,
@@ -1404,7 +1405,7 @@ impl<Signer: ChannelSigner> ChannelMonitor<Signer> {
1404
1405
prev_counterparty_commitment_txid : None ,
1405
1406
1406
1407
counterparty_commitment_params,
1407
- funding_redeemscript,
1408
+ funding_redeemscript : ScriptBuf :: new ( ) ,
1408
1409
channel_value_satoshis,
1409
1410
their_cur_per_commitment_points : None ,
1410
1411
@@ -3069,7 +3070,6 @@ impl<Signer: ChannelSigner> ChannelMonitorImpl<Signer> {
3069
3070
3070
3071
fn generate_claimable_outpoints_and_watch_outputs ( & mut self , reason : ClosureReason ) -> ( Vec < PackageTemplate > , Vec < TransactionOutputs > ) {
3071
3072
let funding_outp = HolderFundingOutput :: build (
3072
- self . funding_redeemscript . clone ( ) ,
3073
3073
self . channel_value_satoshis ,
3074
3074
self . onchain_tx_handler . channel_type_features ( ) . clone ( )
3075
3075
) ;
@@ -5277,7 +5277,7 @@ mod tests {
5277
5277
let monitor = ChannelMonitor :: new ( Secp256k1 :: new ( ) , keys,
5278
5278
Some ( ShutdownScript :: new_p2wpkh_from_pubkey ( shutdown_pubkey) . into_inner ( ) ) , 0 , & ScriptBuf :: new ( ) ,
5279
5279
( OutPoint { txid : Txid :: from_slice ( & [ 43 ; 32 ] ) . unwrap ( ) , index : 0 } , ScriptBuf :: new ( ) ) ,
5280
- & channel_parameters, true , ScriptBuf :: new ( ) , 46 , 0 , HolderCommitmentTransaction :: dummy ( & mut Vec :: new ( ) ) ,
5280
+ & channel_parameters, true , 46 , 0 , HolderCommitmentTransaction :: dummy ( & mut Vec :: new ( ) ) ,
5281
5281
best_block, dummy_key, channel_id) ;
5282
5282
5283
5283
let mut htlcs = preimages_slice_to_htlcs ! ( preimages[ 0 ..10 ] ) ;
@@ -5527,7 +5527,7 @@ mod tests {
5527
5527
let monitor = ChannelMonitor :: new ( Secp256k1 :: new ( ) , keys,
5528
5528
Some ( ShutdownScript :: new_p2wpkh_from_pubkey ( shutdown_pubkey) . into_inner ( ) ) , 0 , & ScriptBuf :: new ( ) ,
5529
5529
( OutPoint { txid : Txid :: from_slice ( & [ 43 ; 32 ] ) . unwrap ( ) , index : 0 } , ScriptBuf :: new ( ) ) ,
5530
- & channel_parameters, true , ScriptBuf :: new ( ) , 46 , 0 , HolderCommitmentTransaction :: dummy ( & mut Vec :: new ( ) ) ,
5530
+ & channel_parameters, true , 46 , 0 , HolderCommitmentTransaction :: dummy ( & mut Vec :: new ( ) ) ,
5531
5531
best_block, dummy_key, channel_id) ;
5532
5532
5533
5533
let chan_id = monitor. inner . lock ( ) . unwrap ( ) . channel_id ( ) ;
0 commit comments