Changeset View
Changeset View
Standalone View
Standalone View
src/test/txindex_tests.cpp
Show First 20 Lines • Show All 57 Lines • ▼ Show 20 Lines | for (int i = 0; i < 10; i++) { | ||||
BOOST_CHECK(txindex.BlockUntilSyncedToCurrentChain()); | BOOST_CHECK(txindex.BlockUntilSyncedToCurrentChain()); | ||||
if (!txindex.FindTx(txn.GetHash(), block_hash, tx_disk)) { | if (!txindex.FindTx(txn.GetHash(), block_hash, tx_disk)) { | ||||
BOOST_ERROR("FindTx failed"); | BOOST_ERROR("FindTx failed"); | ||||
} else if (tx_disk->GetHash() != txn.GetHash()) { | } else if (tx_disk->GetHash() != txn.GetHash()) { | ||||
BOOST_ERROR("Read incorrect tx"); | BOOST_ERROR("Read incorrect tx"); | ||||
} | } | ||||
} | } | ||||
// shutdown sequence (c.f. Shutdown() in init.cpp) | |||||
txindex.Stop(); | |||||
threadGroup.interrupt_all(); | |||||
threadGroup.join_all(); | |||||
// Rest of shutdown sequence and destructors happen in ~TestingSetup() | |||||
} | } | ||||
BOOST_AUTO_TEST_SUITE_END() | BOOST_AUTO_TEST_SUITE_END() |