From 8bfea9685199d7ff782f99ce6d6add8ee59e11ce Mon Sep 17 00:00:00 2001 From: John Nash Date: Mon, 29 Jan 2024 14:19:02 +1100 Subject: [PATCH] pos: move SignatureData inside the loop --- src/wallet/staking.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wallet/staking.cpp b/src/wallet/staking.cpp index 7432ae9e75..ac3fe6452e 100644 --- a/src/wallet/staking.cpp +++ b/src/wallet/staking.cpp @@ -478,10 +478,10 @@ bool CreateCoinStake(CWallet& wallet, unsigned int nBits, int64_t nSearchInterva // Sign int nIn = 0; - SignatureData empty; if (wallet.IsLegacy()) { for (const auto &pcoin : vwtxPrev) { + SignatureData empty; if (!SignSignature(*wallet.GetLegacyScriptPubKeyMan(), *pcoin, txNew, nIn++, SIGHASH_ALL, empty)) return error("CreateCoinStake : failed to sign coinstake"); }