@@ -76,7 +76,7 @@ Task<void> DebugRpcApi::handle_debug_account_range(const nlohmann::json& request
7676 try {
7777 auto start = std::chrono::system_clock::now ();
7878 core::AccountDumper dumper{*tx};
79- DumpAccounts dump_accounts = co_await dumper.dump_accounts (*block_cache_, block_num_or_hash, start_address, max_result, exclude_code, exclude_storage);
79+ DumpAccounts dump_accounts = co_await dumper.dump_accounts (block_num_or_hash, start_address, max_result, exclude_code, exclude_storage);
8080 auto end = std::chrono::system_clock::now ();
8181 std::chrono::duration<double > elapsed_seconds = end - start;
8282 SILK_DEBUG << " dump_accounts: elapsed " << elapsed_seconds.count () << " sec" ;
@@ -216,8 +216,8 @@ Task<void> DebugRpcApi::handle_debug_storage_range_at(const nlohmann::json& requ
216216 try {
217217 const auto chain_storage = tx->make_storage ();
218218 const BlockReader reader{*chain_storage, *tx};
219- const auto block_with_hash = co_await reader. read_block_by_hash (*block_cache_, block_hash);
220- if (!block_with_hash ) {
219+ const auto header_optional = co_await chain_storage-> read_header ( block_hash);
220+ if (!header_optional ) {
221221 SILK_WARN << " debug_storage_range_at: block not found, hash: " << evmc::hex (block_hash);
222222 nlohmann::json result = {{" storage" , nullptr }, {" nextKey" , nullptr }};
223223 reply = make_json_content (request, result);
@@ -246,7 +246,7 @@ Task<void> DebugRpcApi::handle_debug_storage_range_at(const nlohmann::json& requ
246246 return count++ < max_result;
247247 };
248248
249- const auto min_tx_num = co_await tx->first_txn_num_in_block (block_with_hash-> block . header . number );
249+ const auto min_tx_num = co_await tx->first_txn_num_in_block (header_optional-> number );
250250 const auto from_tx_num = min_tx_num + tx_index + 1 ; // for system txn in the beginning of block
251251
252252 StorageWalker storage_walker{*tx};
0 commit comments