@@ -878,6 +878,7 @@ pub(crate) struct ChannelMonitorImpl<Signer: ChannelSigner> {
878878 prev_counterparty_commitment_txid : Option < Txid > ,
879879
880880 counterparty_commitment_params : CounterpartyCommitmentParameters ,
881+ // this field is not used, but kept for backwards compatibility
881882 funding_redeemscript : ScriptBuf ,
882883 channel_value_satoshis : u64 ,
883884 // first is the idx of the first of the two per-commitment points
@@ -1340,7 +1341,7 @@ impl<Signer: ChannelSigner> ChannelMonitor<Signer> {
13401341 pub ( crate ) fn new ( secp_ctx : Secp256k1 < secp256k1:: All > , mut keys : Signer , shutdown_script : Option < ScriptBuf > ,
13411342 on_counterparty_tx_csv : u16 , destination_script : & Script , funding_info : ( OutPoint , ScriptBuf ) ,
13421343 channel_parameters : & ChannelTransactionParameters , holder_pays_commitment_tx_fee : bool ,
1343- funding_redeemscript : ScriptBuf , channel_value_satoshis : u64 ,
1344+ channel_value_satoshis : u64 ,
13441345 commitment_transaction_number_obscure_factor : u64 ,
13451346 initial_holder_commitment_tx : HolderCommitmentTransaction ,
13461347 best_block : BestBlock , counterparty_node_id : PublicKey , channel_id : ChannelId ,
@@ -1404,7 +1405,7 @@ impl<Signer: ChannelSigner> ChannelMonitor<Signer> {
14041405 prev_counterparty_commitment_txid : None ,
14051406
14061407 counterparty_commitment_params,
1407- funding_redeemscript,
1408+ funding_redeemscript : ScriptBuf :: new ( ) ,
14081409 channel_value_satoshis,
14091410 their_cur_per_commitment_points : None ,
14101411
@@ -3069,7 +3070,6 @@ impl<Signer: ChannelSigner> ChannelMonitorImpl<Signer> {
30693070
30703071 fn generate_claimable_outpoints_and_watch_outputs ( & mut self , reason : ClosureReason ) -> ( Vec < PackageTemplate > , Vec < TransactionOutputs > ) {
30713072 let funding_outp = HolderFundingOutput :: build (
3072- self . funding_redeemscript . clone ( ) ,
30733073 self . channel_value_satoshis ,
30743074 self . onchain_tx_handler . channel_type_features ( ) . clone ( )
30753075 ) ;
@@ -5277,7 +5277,7 @@ mod tests {
52775277 let monitor = ChannelMonitor :: new ( Secp256k1 :: new ( ) , keys,
52785278 Some ( ShutdownScript :: new_p2wpkh_from_pubkey ( shutdown_pubkey) . into_inner ( ) ) , 0 , & ScriptBuf :: new ( ) ,
52795279 ( 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 ( ) ) ,
52815281 best_block, dummy_key, channel_id) ;
52825282
52835283 let mut htlcs = preimages_slice_to_htlcs ! ( preimages[ 0 ..10 ] ) ;
@@ -5527,7 +5527,7 @@ mod tests {
55275527 let monitor = ChannelMonitor :: new ( Secp256k1 :: new ( ) , keys,
55285528 Some ( ShutdownScript :: new_p2wpkh_from_pubkey ( shutdown_pubkey) . into_inner ( ) ) , 0 , & ScriptBuf :: new ( ) ,
55295529 ( 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 ( ) ) ,
55315531 best_block, dummy_key, channel_id) ;
55325532
55335533 let chan_id = monitor. inner . lock ( ) . unwrap ( ) . channel_id ( ) ;
0 commit comments