mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-06-24 16:01:26 +02:00
test: fix incorrect named args in wallet tests
This commit is contained in:
parent
8b0e776718
commit
21db4eb3ff
@ -339,7 +339,7 @@ BOOST_FIXTURE_TEST_CASE(importwallet_rescan, TestChain100Setup)
|
|||||||
BOOST_FIXTURE_TEST_CASE(coin_mark_dirty_immature_credit, TestChain100Setup)
|
BOOST_FIXTURE_TEST_CASE(coin_mark_dirty_immature_credit, TestChain100Setup)
|
||||||
{
|
{
|
||||||
CWallet wallet(m_node.chain.get(), "", m_args, CreateDummyWalletDatabase());
|
CWallet wallet(m_node.chain.get(), "", m_args, CreateDummyWalletDatabase());
|
||||||
CWalletTx wtx{m_coinbase_txns.back(), TxStateConfirmed{m_node.chainman->ActiveChain().Tip()->GetBlockHash(), m_node.chainman->ActiveChain().Height(), /*position_in_block=*/0}};
|
CWalletTx wtx{m_coinbase_txns.back(), TxStateConfirmed{m_node.chainman->ActiveChain().Tip()->GetBlockHash(), m_node.chainman->ActiveChain().Height(), /*index=*/0}};
|
||||||
|
|
||||||
LOCK(wallet.cs_wallet);
|
LOCK(wallet.cs_wallet);
|
||||||
wallet.SetWalletFlag(WALLET_FLAG_DESCRIPTORS);
|
wallet.SetWalletFlag(WALLET_FLAG_DESCRIPTORS);
|
||||||
@ -373,7 +373,7 @@ static int64_t AddTx(ChainstateManager& chainman, CWallet& wallet, uint32_t lock
|
|||||||
block = &inserted.first->second;
|
block = &inserted.first->second;
|
||||||
block->nTime = blockTime;
|
block->nTime = blockTime;
|
||||||
block->phashBlock = &hash;
|
block->phashBlock = &hash;
|
||||||
state = TxStateConfirmed{hash, block->nHeight, /*position_in_block=*/0};
|
state = TxStateConfirmed{hash, block->nHeight, /*index=*/0};
|
||||||
}
|
}
|
||||||
return wallet.AddToWallet(MakeTransactionRef(tx), state, [&](CWalletTx& wtx, bool /* new_tx */) {
|
return wallet.AddToWallet(MakeTransactionRef(tx), state, [&](CWalletTx& wtx, bool /* new_tx */) {
|
||||||
// Assign wtx.m_state to simplify test and avoid the need to simulate
|
// Assign wtx.m_state to simplify test and avoid the need to simulate
|
||||||
@ -540,7 +540,7 @@ public:
|
|||||||
wallet->SetLastBlockProcessed(wallet->GetLastBlockHeight() + 1, m_node.chainman->ActiveChain().Tip()->GetBlockHash());
|
wallet->SetLastBlockProcessed(wallet->GetLastBlockHeight() + 1, m_node.chainman->ActiveChain().Tip()->GetBlockHash());
|
||||||
auto it = wallet->mapWallet.find(tx->GetHash());
|
auto it = wallet->mapWallet.find(tx->GetHash());
|
||||||
BOOST_CHECK(it != wallet->mapWallet.end());
|
BOOST_CHECK(it != wallet->mapWallet.end());
|
||||||
it->second.m_state = TxStateConfirmed{m_node.chainman->ActiveChain().Tip()->GetBlockHash(), m_node.chainman->ActiveChain().Height(), /*position_in_block=*/1};
|
it->second.m_state = TxStateConfirmed{m_node.chainman->ActiveChain().Tip()->GetBlockHash(), m_node.chainman->ActiveChain().Height(), /*index=*/1};
|
||||||
return it->second;
|
return it->second;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user