aboutsummaryrefslogtreecommitdiff
path: root/src/wallet
diff options
context:
space:
mode:
authorpracticalswift <practicalswift@users.noreply.github.com>2020-12-05 10:50:20 +0000
committerpracticalswift <practicalswift@users.noreply.github.com>2020-12-06 00:48:09 +0000
commit281cf995547f7683a9e9186bc6384a9fb6035d10 (patch)
treed969a453d0d7c59c0f9b6af66f4bfb3f70caed2d /src/wallet
parentf35e4d906fee907f28ac5d8f32d4948e6b7b14c3 (diff)
Do not run functions with necessary side-effects in assert()
Diffstat (limited to 'src/wallet')
-rw-r--r--src/wallet/test/coinselector_tests.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/wallet/test/coinselector_tests.cpp b/src/wallet/test/coinselector_tests.cpp
index f38ccba384..f10b559c78 100644
--- a/src/wallet/test/coinselector_tests.cpp
+++ b/src/wallet/test/coinselector_tests.cpp
@@ -64,7 +64,8 @@ static void add_coin(CWallet& wallet, const CAmount& nValue, int nAge = 6*24, bo
if (spendable) {
CTxDestination dest;
std::string error;
- assert(wallet.GetNewDestination(OutputType::BECH32, "", dest, error));
+ const bool destination_ok = wallet.GetNewDestination(OutputType::BECH32, "", dest, error);
+ assert(destination_ok);
tx.vout[nInput].scriptPubKey = GetScriptForDestination(dest);
}
if (fIsFromMe) {