mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 15:09:59 +01:00
Merge #20575: Do not run functions with necessary side-effects in assert()
5021810650Make CanFlushToDisk a const member function (practicalswift)281cf99554Do not run functions with necessary side-effects in assert() (practicalswift) Pull request description: Do not run functions with necessary side-effects in `assert()`. ACKs for top commit: laanwj: Code review ACK5021810650sipa: utACK5021810650theStack: Code Review ACK5021810650🟢 Tree-SHA512: 38b7faccc2f16a499f9b7b1b962b49eb58580b2a2bbf63ea49dcc418a5ecc8f21a0972fa953f66db9509c7239af67cfa2f9266423fd220963d091034d7332b96
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user