refactor: Add LIFETIMEBOUND to all (w)txid getters
Then, use the compiler warnings to create copies only where needed. Also, fix iwyu includes while touching the includes.
This commit is contained in:
6 files changed
+19
-17
No files matched your search
@@ -40,7 +40,7 @@ static void addCoin(CoinsResult& coins,
|
||||
tx.vout[0].nValue = nValue;
|
||||
tx.vout[0].scriptPubKey = GetScriptForDestination(dest);
|
||||
|
||||
const uint256& txid = tx.GetHash();
|
||||
const auto txid{tx.GetHash().ToUint256()};
|
||||
LOCK(wallet.cs_wallet);
|
||||
auto ret = wallet.mapWallet.emplace(std::piecewise_construct, std::forward_as_tuple(txid), std::forward_as_tuple(MakeTransactionRef(std::move(tx)), TxStateInactive{}));
|
||||
assert(ret.second);
|
||||
|
||||
@@ -963,7 +963,7 @@ BOOST_FIXTURE_TEST_CASE(wallet_sync_tx_invalid_state_test, TestingSetup)
|
||||
mtx.vin.clear();
|
||||
mtx.vin.emplace_back(tx_id_to_spend, 0);
|
||||
wallet.transactionAddedToMempool(MakeTransactionRef(mtx));
|
||||
const uint256& good_tx_id = mtx.GetHash();
|
||||
const auto good_tx_id{mtx.GetHash().ToUint256()};
|
||||
|
||||
{
|
||||
// Verify balance update for the new tx and the old one
|
||||
|
||||
Reference in new issue
Block a user