From 53fe0b70adeffe4cb94e6fa18a9abbdf674a2cd0 Mon Sep 17 00:00:00 2001 From: Russell Yanofsky Date: Tue, 29 Oct 2019 12:25:28 -0400 Subject: Fix missing strFailReason in CreateTransaction Suggested by MarcoFalke https://github.com/bitcoin/bitcoin/pull/17260#discussion_r340036269 --- src/wallet/wallet.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src') diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 7ffdcd1368..069ae57878 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; -- cgit v1.2.3