Skip to content

Commit 2690823

Browse files
committed
Move hash_to_message to variable
1 parent b6059e9 commit 2690823

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lightning/src/sign/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1216,7 +1216,8 @@ impl EcdsaChannelSigner for InMemorySigner {
12161216
let our_htlc_private_key = chan_utils::derive_private_key(
12171217
&secp_ctx, &htlc_descriptor.per_commitment_point, &self.htlc_base_key
12181218
);
1219-
Ok(sign_with_aux_rand(&secp_ctx, &hash_to_message!(sighash.as_byte_array()), &our_htlc_private_key, &self))
1219+
let sighash = hash_to_message!(sighash.as_byte_array());
1220+
Ok(sign_with_aux_rand(&secp_ctx, &sighash, &our_htlc_private_key, &self))
12201221
}
12211222

12221223
fn sign_counterparty_htlc_transaction(&self, htlc_tx: &Transaction, input: usize, amount: u64, per_commitment_point: &PublicKey, htlc: &HTLCOutputInCommitment, secp_ctx: &Secp256k1<secp256k1::All>) -> Result<Signature, ()> {

0 commit comments

Comments
 (0)