Skip to content

Commit 4ec4e89

Browse files
authored
Merge pull request #1805 from TheBlueMatt/2022-10-remote-useless-mut
Drop useless `mut` in `KeysInterface::sign_holder_anchor_input`
2 parents 962d096 + f63df16 commit 4ec4e89

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lightning/src/chain/keysinterface.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ pub trait BaseSign {
352352
/// Computes the signature for a commitment transaction's anchor output used as an
353353
/// input within `anchor_tx`, which spends the commitment transaction, at index `input`.
354354
fn sign_holder_anchor_input(
355-
&self, anchor_tx: &mut Transaction, input: usize, secp_ctx: &Secp256k1<secp256k1::All>,
355+
&self, anchor_tx: &Transaction, input: usize, secp_ctx: &Secp256k1<secp256k1::All>,
356356
) -> Result<Signature, ()>;
357357

358358
/// Signs a channel announcement message with our funding key and our node secret key (aka
@@ -790,7 +790,7 @@ impl BaseSign for InMemorySigner {
790790
}
791791

792792
fn sign_holder_anchor_input(
793-
&self, anchor_tx: &mut Transaction, input: usize, secp_ctx: &Secp256k1<secp256k1::All>,
793+
&self, anchor_tx: &Transaction, input: usize, secp_ctx: &Secp256k1<secp256k1::All>,
794794
) -> Result<Signature, ()> {
795795
let witness_script = chan_utils::get_anchor_redeemscript(&self.holder_channel_pubkeys.funding_pubkey);
796796
let sighash = sighash::SighashCache::new(&*anchor_tx).segwit_signature_hash(

lightning/src/util/enforcing_trait_impls.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ impl BaseSign for EnforcingSigner {
201201
}
202202

203203
fn sign_holder_anchor_input(
204-
&self, anchor_tx: &mut Transaction, input: usize, secp_ctx: &Secp256k1<secp256k1::All>,
204+
&self, anchor_tx: &Transaction, input: usize, secp_ctx: &Secp256k1<secp256k1::All>,
205205
) -> Result<Signature, ()> {
206206
debug_assert!(MIN_CHAN_DUST_LIMIT_SATOSHIS > ANCHOR_OUTPUT_VALUE_SATOSHI);
207207
// As long as our minimum dust limit is enforced and is greater than our anchor output

0 commit comments

Comments
 (0)