MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / ImportBlocks

Method ImportBlocks

src/kernel/bitcoinkernel_wrapper.h:1303–1315  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1301 }
1302
1303 bool ImportBlocks(const std::span<const std::string> paths)
1304 {
1305 std::vector<const char*> c_paths;
1306 std::vector<size_t> c_paths_lens;
1307 c_paths.reserve(paths.size());
1308 c_paths_lens.reserve(paths.size());
1309 for (const auto& path : paths) {
1310 c_paths.push_back(path.c_str());
1311 c_paths_lens.push_back(path.length());
1312 }
1313
1314 return btck_chainstate_manager_import_blocks(get(), c_paths.data(), c_paths_lens.data(), c_paths.size()) == 0;
1315 }
1316
1317 bool ProcessBlock(const Block& block, bool* new_block)
1318 {

Callers 2

chainman_reindex_testFunction · 0.80

Calls 6

getFunction · 0.85
reserveMethod · 0.45
sizeMethod · 0.45
push_backMethod · 0.45
dataMethod · 0.45

Tested by 2

chainman_reindex_testFunction · 0.64