wallet: Use correct params when signing txes in CreateTransaction (#4207)

We do not sign amounts and default sighash is SIGHASH_ALL so everything still works but it would break if/when we would start to actually sign amounts.

Missed it in https://github.com/dashpay/dash/pull/3101/files#diff-1f2db0e4d5c12d109c7f0962333c245b49b696cb39ff432da048e9d6c08944d8R3914
This commit is contained in:
UdjinM6 2021-06-24 19:08:26 +03:00 committed by GitHub
parent 20659acbd7
commit 6e66592ba7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3919,7 +3919,7 @@ bool CWallet::CreateTransaction(const std::vector<CRecipient>& vecSend, CTransac
const CScript& scriptPubKey = coin.txout.scriptPubKey;
SignatureData sigdata;
if (!ProduceSignature(*this, TransactionSignatureCreator(&txNewConst, nIn, SIGHASH_ALL), scriptPubKey, sigdata))
if (!ProduceSignature(*this, TransactionSignatureCreator(&txNewConst, nIn, coin.txout.nValue, SIGHASH_ALL), scriptPubKey, sigdata))
{
strFailReason = _("Signing transaction failed");
return false;