From 6e66592ba7d2a1c3e116cdb1d517a709ff4da4a0 Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Thu, 24 Jun 2021 19:08:26 +0300 Subject: [PATCH] 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 --- src/wallet/wallet.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index b5afe29012..1e95b3609d 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -3919,7 +3919,7 @@ bool CWallet::CreateTransaction(const std::vector& 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;