Merge pull request #1805 from TheBlueMatt/2022-10-remote-useless-mut
authorMatt Corallo <649246+TheBlueMatt@users.noreply.github.com>
Thu, 27 Oct 2022 16:11:28 +0000 (16:11 +0000)
committerGitHub <noreply@github.com>
Thu, 27 Oct 2022 16:11:28 +0000 (16:11 +0000)
Drop useless `mut` in `KeysInterface::sign_holder_anchor_input`

lightning/src/chain/keysinterface.rs
lightning/src/util/enforcing_trait_impls.rs

index e3108fd54daa9c5a773cf0acfa85611c3c5fd787..b12eee017aa93b81a080bf342a267c76aa309f5e 100644 (file)
@@ -352,7 +352,7 @@ pub trait BaseSign {
        /// Computes the signature for a commitment transaction's anchor output used as an
        /// input within `anchor_tx`, which spends the commitment transaction, at index `input`.
        fn sign_holder_anchor_input(
-               &self, anchor_tx: &mut Transaction, input: usize, secp_ctx: &Secp256k1<secp256k1::All>,
+               &self, anchor_tx: &Transaction, input: usize, secp_ctx: &Secp256k1<secp256k1::All>,
        ) -> Result<Signature, ()>;
 
        /// Signs a channel announcement message with our funding key and our node secret key (aka
@@ -790,7 +790,7 @@ impl BaseSign for InMemorySigner {
        }
 
        fn sign_holder_anchor_input(
-               &self, anchor_tx: &mut Transaction, input: usize, secp_ctx: &Secp256k1<secp256k1::All>,
+               &self, anchor_tx: &Transaction, input: usize, secp_ctx: &Secp256k1<secp256k1::All>,
        ) -> Result<Signature, ()> {
                let witness_script = chan_utils::get_anchor_redeemscript(&self.holder_channel_pubkeys.funding_pubkey);
                let sighash = sighash::SighashCache::new(&*anchor_tx).segwit_signature_hash(
index 8344f9f357f959b5d62a4e35ee4e1a677ddfa8b4..6317b43d5ed3b406f13f2f0f932bf59c6b07947c 100644 (file)
@@ -201,7 +201,7 @@ impl BaseSign for EnforcingSigner {
        }
 
        fn sign_holder_anchor_input(
-               &self, anchor_tx: &mut Transaction, input: usize, secp_ctx: &Secp256k1<secp256k1::All>,
+               &self, anchor_tx: &Transaction, input: usize, secp_ctx: &Secp256k1<secp256k1::All>,
        ) -> Result<Signature, ()> {
                debug_assert!(MIN_CHAN_DUST_LIMIT_SATOSHIS > ANCHOR_OUTPUT_VALUE_SATOSHI);
                // As long as our minimum dust limit is enforced and is greater than our anchor output