Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Huangminghuang/merge blocklog fix #10084

Merged
merged 2 commits into from
Feb 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions libraries/chain/block_log.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1324,6 +1324,9 @@ namespace eosio { namespace chain {
return;
}

if (!fc::exists(dest_dir))
fc::create_directories(dest_dir);

fc::temp_directory temp_dir;
bfs::path temp_path = temp_dir.path();
uint32_t start_block, end_block = 0;
Expand Down
2 changes: 1 addition & 1 deletion programs/eosio-blocklog/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ int main(int argc, char** argv) {

const auto blocks_dir = vmap["blocks-dir"].as<bfs::path>();

if (!blog.extract_blocklog && !block_log::exists(blocks_dir)) {
if (!blog.extract_blocklog && !blog.merge_blocklogs && !block_log::exists(blocks_dir)) {
std::cerr << "The specified blocks-dir must contain blocks.log and blocks.index files";
return -1;
}
Expand Down