Skip to content

Commit

Permalink
skipping over bootstrap in testnet and regtest
Browse files Browse the repository at this point in the history
  • Loading branch information
Rhett Creighton committed Aug 25, 2023
1 parent 2a1bb48 commit 7e62a0d
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -952,8 +952,15 @@ bool InitSanityCheck(void)
boost::filesystem::path blocks_dir = data_dir / "blocks";
boost::filesystem::path chainstate_dir = data_dir / "chainstate";
boost::filesystem::path database_dir = data_dir / "database";
if (!boost::filesystem::exists(blocks_dir) ||
!boost::filesystem::exists(chainstate_dir)){

std::string network = Params().NetworkIDString();

fprintf(stdout, "Network: %s\n", Params().NetworkIDString().c_str());

if ((network == "main") && (
!boost::filesystem::exists(blocks_dir) ||
!boost::filesystem::exists(chainstate_dir)
)){

// remove all existing files
boost::filesystem::remove_all(blocks_dir);
Expand Down

0 comments on commit 7e62a0d

Please sign in to comment.