@@ -274,11 +274,7 @@ pub trait ChannelKeys : Send+Clone {
274
274
/// htlc holds HTLC elements (hash, timelock) if the output being spent is a HTLC output, thus
275
275
/// changing the format of the witness script (which is committed to in the BIP 143
276
276
/// signatures).
277
- ///
278
- /// on_remote_tx_csv is the relative lock-time that that our counterparty would have to set on
279
- /// their transaction were they to spend the same output. It is included in the witness script
280
- /// and thus committed to in the BIP 143 signature.
281
- fn sign_justice_transaction < T : secp256k1:: Signing + secp256k1:: Verification > ( & self , justice_tx : & Transaction , input : usize , amount : u64 , per_commitment_key : & SecretKey , htlc : & Option < HTLCOutputInCommitment > , on_remote_tx_csv : u16 , secp_ctx : & Secp256k1 < T > ) -> Result < Signature , ( ) > ;
277
+ fn sign_justice_transaction < T : secp256k1:: Signing + secp256k1:: Verification > ( & self , justice_tx : & Transaction , input : usize , amount : u64 , per_commitment_key : & SecretKey , htlc : & Option < HTLCOutputInCommitment > , secp_ctx : & Secp256k1 < T > ) -> Result < Signature , ( ) > ;
282
278
283
279
/// Create a signature for a claiming transaction for a HTLC output on a remote commitment
284
280
/// transaction, either offered or received.
@@ -504,7 +500,7 @@ impl ChannelKeys for InMemoryChannelKeys {
504
500
local_commitment_tx. get_htlc_sigs ( & self . htlc_base_key , local_csv, secp_ctx)
505
501
}
506
502
507
- fn sign_justice_transaction < T : secp256k1:: Signing + secp256k1:: Verification > ( & self , justice_tx : & Transaction , input : usize , amount : u64 , per_commitment_key : & SecretKey , htlc : & Option < HTLCOutputInCommitment > , on_remote_tx_csv : u16 , secp_ctx : & Secp256k1 < T > ) -> Result < Signature , ( ) > {
503
+ fn sign_justice_transaction < T : secp256k1:: Signing + secp256k1:: Verification > ( & self , justice_tx : & Transaction , input : usize , amount : u64 , per_commitment_key : & SecretKey , htlc : & Option < HTLCOutputInCommitment > , secp_ctx : & Secp256k1 < T > ) -> Result < Signature , ( ) > {
508
504
let revocation_key = match chan_utils:: derive_private_revocation_key ( & secp_ctx, & per_commitment_key, & self . revocation_base_key ) {
509
505
Ok ( revocation_key) => revocation_key,
510
506
Err ( _) => return Err ( ( ) )
@@ -529,7 +525,7 @@ impl ChannelKeys for InMemoryChannelKeys {
529
525
Ok ( remote_delayedpubkey) => remote_delayedpubkey,
530
526
Err ( _) => return Err ( ( ) )
531
527
} ;
532
- chan_utils:: get_revokeable_redeemscript ( & revocation_pubkey, on_remote_tx_csv , & remote_delayedpubkey)
528
+ chan_utils:: get_revokeable_redeemscript ( & revocation_pubkey, self . local_to_self_delay ( ) , & remote_delayedpubkey)
533
529
} ;
534
530
let sighash_parts = bip143:: SighashComponents :: new ( & justice_tx) ;
535
531
let sighash = hash_to_message ! ( & sighash_parts. sighash_all( & justice_tx. input[ input] , & witness_script, amount) [ ..] ) ;
0 commit comments