Changeset View
Changeset View
Standalone View
Standalone View
src/test/txindex_tests.cpp
Show All 14 Lines | |||||
#include <boost/test/unit_test.hpp> | #include <boost/test/unit_test.hpp> | ||||
BOOST_AUTO_TEST_SUITE(txindex_tests) | BOOST_AUTO_TEST_SUITE(txindex_tests) | ||||
BOOST_FIXTURE_TEST_CASE(txindex_initial_sync, TestChain100Setup) { | BOOST_FIXTURE_TEST_CASE(txindex_initial_sync, TestChain100Setup) { | ||||
TxIndex txindex(1 << 20, true); | TxIndex txindex(1 << 20, true); | ||||
CTransactionRef tx_disk; | CTransactionRef tx_disk; | ||||
uint256 block_hash; | BlockHash block_hash; | ||||
// Transaction should not be found in the index before it is started. | // Transaction should not be found in the index before it is started. | ||||
for (const auto &txn : m_coinbase_txns) { | for (const auto &txn : m_coinbase_txns) { | ||||
BOOST_CHECK(!txindex.FindTx(txn->GetId(), block_hash, tx_disk)); | BOOST_CHECK(!txindex.FindTx(txn->GetId(), block_hash, tx_disk)); | ||||
} | } | ||||
// BlockUntilSyncedToCurrentChain should return false before txindex is | // BlockUntilSyncedToCurrentChain should return false before txindex is | ||||
// started. | // started. | ||||
▲ Show 20 Lines • Show All 54 Lines • Show Last 20 Lines |