mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 15:09:59 +01:00
Make CMutableTransaction constructor explicit
Silently converting to a CMutableTransaction will drop all caches and should thus be done explicitly
This commit is contained in:
@@ -185,7 +185,7 @@ Result CreateTransaction(const CWallet* wallet, const uint256& txid, const CCoin
|
||||
// If the output is not large enough to pay the fee, fail.
|
||||
CAmount nDelta = new_fee - old_fee;
|
||||
assert(nDelta > 0);
|
||||
mtx = *wtx.tx;
|
||||
mtx = CMutableTransaction{*wtx.tx};
|
||||
CTxOut* poutput = &(mtx.vout[nOutput]);
|
||||
if (poutput->nValue < nDelta) {
|
||||
errors.push_back("Change output is too small to bump the fee");
|
||||
|
||||
Reference in New Issue
Block a user