diff options
| author | Russell Yanofsky <[email protected]> | 2019-10-29 12:25:28 -0400 |
|---|---|---|
| committer | Russell Yanofsky <[email protected]> | 2019-10-29 12:25:28 -0400 |
| commit | 53fe0b70adeffe4cb94e6fa18a9abbdf674a2cd0 (patch) | |
| tree | b872832b26baabc5354154dd07642c4de45527db /src/wallet/wallet.cpp | |
| parent | Fix misplaced AssertLockHeld (diff) | |
| download | discoin-53fe0b70adeffe4cb94e6fa18a9abbdf674a2cd0.tar.xz discoin-53fe0b70adeffe4cb94e6fa18a9abbdf674a2cd0.zip | |
Fix missing strFailReason in CreateTransaction
Suggested by MarcoFalke <[email protected]>
https://github.com/bitcoin/bitcoin/pull/17260#discussion_r340036269
Diffstat (limited to 'src/wallet/wallet.cpp')
| -rw-r--r-- | src/wallet/wallet.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 7ffdcd136..069ae5787 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -2783,11 +2783,7 @@ bool CWallet::CreateTransaction(interfaces::Chain::Lock& locked_chain, const std SignatureData sigdata; const SigningProvider* provider = GetSigningProvider(); - if (!provider) { - return false; - } - - if (!ProduceSignature(*provider, MutableTransactionSignatureCreator(&txNew, nIn, coin.txout.nValue, SIGHASH_ALL), scriptPubKey, sigdata)) + if (!provider || !ProduceSignature(*provider, MutableTransactionSignatureCreator(&txNew, nIn, coin.txout.nValue, SIGHASH_ALL), scriptPubKey, sigdata)) { strFailReason = _("Signing transaction failed").translated; return false; |