Changeset View
Changeset View
Standalone View
Standalone View
src/test/txindex_tests.cpp
Show First 20 Lines • Show All 68 Lines • ▼ Show 20 Lines | for (int i = 0; i < 10; i++) { | ||||
} else if (tx_disk->GetId() != txn->GetId()) { | } else if (tx_disk->GetId() != txn->GetId()) { | ||||
BOOST_ERROR("Read incorrect tx"); | BOOST_ERROR("Read incorrect tx"); | ||||
} | } | ||||
} | } | ||||
// shutdown sequence (c.f. Shutdown() in init.cpp) | // shutdown sequence (c.f. Shutdown() in init.cpp) | ||||
txindex.Stop(); | txindex.Stop(); | ||||
// txindex job may be scheduled, so stop scheduler before destructing | // Let scheduler events finish running to avoid accessing any memory related | ||||
m_node.scheduler->stop(); | // to txindex after it is destructed | ||||
threadGroup.interrupt_all(); | SyncWithValidationInterfaceQueue(); | ||||
threadGroup.join_all(); | |||||
// Rest of shutdown sequence and destructors happen in ~TestingSetup() | |||||
} | } | ||||
BOOST_AUTO_TEST_SUITE_END() | BOOST_AUTO_TEST_SUITE_END() |