Skip to content

Commit aa281cf

Browse files
authored
Merge pull request #4925 from pwojcikdev/init-error
Use exceptions for store initialization errors
2 parents 0d19dd4 + c8762e7 commit aa281cf

28 files changed

+428
-579
lines changed

nano/benchmarks/ledger.cpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,6 @@ static void BM_ledger_iterate_accounts (benchmark::State & state)
2323
auto store_impl{ nano::make_store (logger, application_path, network_params.ledger) };
2424
auto & store{ *store_impl };
2525

26-
if (store.init_error ())
27-
{
28-
state.SkipWithError ("Store initialization failed. Make sure ledger files are present in the default location.");
29-
}
30-
3126
auto ledger_impl{ std::make_unique<nano::ledger> (store, network_params.ledger, stats, logger, nano::generate_cache_flags::all_disabled ()) };
3227
auto & ledger{ *ledger_impl };
3328

@@ -71,11 +66,6 @@ static void BM_store_iterate_accounts (benchmark::State & state)
7166
auto store_impl{ nano::make_store (logger, application_path, network_params.ledger) };
7267
auto & store{ *store_impl };
7368

74-
if (store.init_error ())
75-
{
76-
state.SkipWithError ("Store initialization failed. Make sure ledger files are present in the default location.");
77-
}
78-
7969
auto transaction = store.tx_begin_read ();
8070
nano::account current{ 0 };
8171
nano::account_info current_info;

0 commit comments

Comments
 (0)