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/wallet.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/wallet/wallet.cpp') diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 9533e6ff5..fb772bfc4 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -2065,8 +2065,8 @@ bool CWalletTx::IsTrusted() const bool CWalletTx::IsEquivalentTo(const CWalletTx& _tx) const { - CMutableTransaction tx1 = *this->tx; - CMutableTransaction tx2 = *_tx.tx; + CMutableTransaction tx1 {*this->tx}; + CMutableTransaction tx2 {*_tx.tx}; for (auto& txin : tx1.vin) txin.scriptSig = CScript(); for (auto& txin : tx2.vin) txin.scriptSig = CScript(); return CTransaction(tx1) == CTransaction(tx2); -- cgit v1.2.3