Skip to content

Commit

Permalink
pos: move SignatureData inside the loop
Browse files Browse the repository at this point in the history
  • Loading branch information
reddink committed Jan 29, 2024
1 parent c1e5fa7 commit 8bfea96
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/wallet/staking.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
Expand Down

0 comments on commit 8bfea96

Please sign in to comment.