| 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 | { |