View in context in the libbitcoin Slack #general mirror.
./bn -t Using default configuration settings. Database is started. Getting first [100] output address hashes. Segmentation fault
./bn 2025-01-03T16:18:31Z.0 ====================== startup ======================= 2025-01-03T16:18:31Z.0 Using default configuration settings. 2025-01-03T16:18:31Z.0 Database failed to start with error 'flush lock failure'. 2025-01-03T16:18:31Z.0 Please wait while restoring from most recent snapshot... 2025-01-03T16:18:31Z.0 restore::recover_snapshot(store) 2025-01-03T16:18:31Z.0 Database restore failed with error 'missing snapshot'. 2025-01-03T16:18:31Z.0 Node stopped successfully. 2025-01-03T16:18:31Z.0 ====================== shutdown ====================== 2025-01-03T16:18:31Z.0 Press <enter> to exit...
void executor::read_test(bool dump) const
{
using namespace database;
constexpr auto start_tx = 1'000'000_u32;
constexpr auto target_count = 100_size;
// Set ensures unique addresses.
std::set<hash_digest> keys{};
auto tx = start_tx;
logger(format("Getting first [%1%] output address hashes.") % target_count);
auto start = fine_clock::now();
while (!cancel_ && keys.size() < target_count)
{
const auto outputs = query_.get_outputs(tx++);
if (outputs->empty())
{
// fault, tx with no outputs.
return;
}
for (const auto& put: *outputs)
{
keys.emplace(put->script().hash());
if (cancel_ || keys.size() == target_count)
break;
}
}
auto span = duration_cast<milliseconds>(fine_clock::now() - start);
logger(format("Got first [%1%] unique addresses above tx [%2%] in [%3%] ms.") %
keys.size() % start_tx % span.count());