From 7e62a0dea1772438aa2da62d8c829b822299c57d Mon Sep 17 00:00:00 2001 From: Rhett Creighton <> Date: Fri, 25 Aug 2023 05:41:10 -0400 Subject: [PATCH] skipping over bootstrap in testnet and regtest --- src/init.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/init.cpp b/src/init.cpp index 55ffcd21416..35123e8b28f 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -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);