wallet: Replace CWalletTx in COutput with COutPoint and CTxOut
Instead of having a pointer to the CWalletTx in COutput, we can just store the COutPoint and the CTxOut as those are the only things we need from the CWalletTx. Other things CWalletTx used to provide were time and fIsFromMe but these are also being stored by COutput.
This commit is contained in:
1 parent
0ba4d1916e
commit
14d04d5ad1
6 files changed
+30
-22
No files matched your search
@@ -331,7 +331,7 @@ BOOST_AUTO_TEST_CASE(bnb_search_test)
|
||||
add_coin(coins, *wallet, 2 * CENT, 6 * 24, false, 0, true);
|
||||
CCoinControl coin_control;
|
||||
coin_control.fAllowOtherInputs = true;
|
||||
coin_control.Select(COutPoint(coins.at(0).tx->GetHash(), coins.at(0).i));
|
||||
coin_control.Select(coins.at(0).outpoint);
|
||||
coin_selection_params_bnb.m_effective_feerate = CFeeRate(0);
|
||||
const auto result10 = SelectCoins(*wallet, coins, 10 * CENT, coin_control, coin_selection_params_bnb);
|
||||
BOOST_CHECK(result10);
|
||||
|
||||
@@ -588,7 +588,7 @@ BOOST_FIXTURE_TEST_CASE(ListCoinsTest, ListCoinsTestingSetup)
|
||||
for (const auto& group : list) {
|
||||
for (const auto& coin : group.second) {
|
||||
LOCK(wallet->cs_wallet);
|
||||
wallet->LockCoin(COutPoint(coin.tx->GetHash(), coin.i));
|
||||
wallet->LockCoin(coin.outpoint);
|
||||
}
|
||||
}
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user