@@ -215,6 +215,8 @@ pub(crate) enum OnchainClaim {
215215/// do RBF bumping if possible.
216216#[ derive( Clone ) ]
217217pub struct OnchainTxHandler < ChannelSigner : WriteableEcdsaChannelSigner > {
218+ channel_value_satoshis : u64 ,
219+ channel_keys_id : [ u8 ; 32 ] ,
218220 destination_script : Script ,
219221 holder_commitment : HolderCommitmentTransaction ,
220222 // holder_htlc_sigs and prev_holder_htlc_sigs are in the order as they appear in the commitment
@@ -276,7 +278,9 @@ pub struct OnchainTxHandler<ChannelSigner: WriteableEcdsaChannelSigner> {
276278impl < ChannelSigner : WriteableEcdsaChannelSigner > PartialEq for OnchainTxHandler < ChannelSigner > {
277279 fn eq ( & self , other : & Self ) -> bool {
278280 // `signer`, `secp_ctx`, and `pending_claim_events` are excluded on purpose.
279- self . destination_script == other. destination_script &&
281+ self . channel_value_satoshis == other. channel_value_satoshis &&
282+ self . channel_keys_id == other. channel_keys_id &&
283+ self . destination_script == other. destination_script &&
280284 self . holder_commitment == other. holder_commitment &&
281285 self . holder_htlc_sigs == other. holder_htlc_sigs &&
282286 self . prev_holder_commitment == other. prev_holder_commitment &&
@@ -418,6 +422,8 @@ impl<'a, 'b, ES: EntropySource, SP: SignerProvider> ReadableArgs<(&'a ES, &'b SP
418422 secp_ctx. seeded_randomize ( & entropy_source. get_secure_random_bytes ( ) ) ;
419423
420424 Ok ( OnchainTxHandler {
425+ channel_value_satoshis,
426+ channel_keys_id,
421427 destination_script,
422428 holder_commitment,
423429 holder_htlc_sigs,
@@ -436,8 +442,14 @@ impl<'a, 'b, ES: EntropySource, SP: SignerProvider> ReadableArgs<(&'a ES, &'b SP
436442}
437443
438444impl < ChannelSigner : WriteableEcdsaChannelSigner > OnchainTxHandler < ChannelSigner > {
439- pub ( crate ) fn new ( destination_script : Script , signer : ChannelSigner , channel_parameters : ChannelTransactionParameters , holder_commitment : HolderCommitmentTransaction , secp_ctx : Secp256k1 < secp256k1:: All > ) -> Self {
445+ pub ( crate ) fn new (
446+ channel_value_satoshis : u64 , channel_keys_id : [ u8 ; 32 ] , destination_script : Script ,
447+ signer : ChannelSigner , channel_parameters : ChannelTransactionParameters ,
448+ holder_commitment : HolderCommitmentTransaction , secp_ctx : Secp256k1 < secp256k1:: All >
449+ ) -> Self {
440450 OnchainTxHandler {
451+ channel_value_satoshis,
452+ channel_keys_id,
441453 destination_script,
442454 holder_commitment,
443455 holder_htlc_sigs : None ,
0 commit comments