From faab55fbb17f2ea5080bf02bc59eeef5ca746f07 Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Fri, 4 May 2018 17:38:49 -0400 Subject: Make CMutableTransaction constructor explicit Silently converting to a CMutableTransaction will drop all caches and should thus be done explicitly --- src/wallet/feebumper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/wallet/feebumper.cpp') diff --git a/src/wallet/feebumper.cpp b/src/wallet/feebumper.cpp index 4d70dde72a..b26fd28d48 100644 --- a/src/wallet/feebumper.cpp +++ b/src/wallet/feebumper.cpp @@ -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"); -- cgit v1.2.3