@@ -215,6 +215,8 @@ pub(crate) enum OnchainClaim {
215
215
/// do RBF bumping if possible.
216
216
#[ derive( Clone ) ]
217
217
pub struct OnchainTxHandler < ChannelSigner : WriteableEcdsaChannelSigner > {
218
+ channel_value_satoshis : u64 ,
219
+ channel_keys_id : [ u8 ; 32 ] ,
218
220
destination_script : Script ,
219
221
holder_commitment : HolderCommitmentTransaction ,
220
222
// 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> {
276
278
impl < ChannelSigner : WriteableEcdsaChannelSigner > PartialEq for OnchainTxHandler < ChannelSigner > {
277
279
fn eq ( & self , other : & Self ) -> bool {
278
280
// `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 &&
280
284
self . holder_commitment == other. holder_commitment &&
281
285
self . holder_htlc_sigs == other. holder_htlc_sigs &&
282
286
self . prev_holder_commitment == other. prev_holder_commitment &&
@@ -418,6 +422,8 @@ impl<'a, 'b, ES: EntropySource, SP: SignerProvider> ReadableArgs<(&'a ES, &'b SP
418
422
secp_ctx. seeded_randomize ( & entropy_source. get_secure_random_bytes ( ) ) ;
419
423
420
424
Ok ( OnchainTxHandler {
425
+ channel_value_satoshis,
426
+ channel_keys_id,
421
427
destination_script,
422
428
holder_commitment,
423
429
holder_htlc_sigs,
@@ -436,8 +442,14 @@ impl<'a, 'b, ES: EntropySource, SP: SignerProvider> ReadableArgs<(&'a ES, &'b SP
436
442
}
437
443
438
444
impl < 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 {
440
450
OnchainTxHandler {
451
+ channel_value_satoshis,
452
+ channel_keys_id,
441
453
destination_script,
442
454
holder_commitment,
443
455
holder_htlc_sigs : None ,
0 commit comments