diff --git a/src/init.cpp b/src/init.cpp index 50975c7b0..f367fd905 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1487,8 +1487,10 @@ bool AppInitMain(InitInterfaces& interfaces) auto& consensus = chainparams.GetConsensus(); if (g_logger->Enabled() && LogAcceptCategory(BCLog::CLAIMS)) CLogPrint::global().setLogger(g_logger); + auto dataDir = GetDataDir() / "claimtrie"; + TryCreateDirectories(dataDir); pclaimTrie = new CClaimTrie(fReindex || fReindexChainState, 0, - (GetDataDir() / "claimtrie").string(), + dataDir.string(), consensus.nNormalizedNameForkHeight, consensus.nOriginalClaimExpirationTime, consensus.nExtendedClaimExpirationTime, diff --git a/src/test/setup_common.cpp b/src/test/setup_common.cpp index 6dbc59c6c..5ca3ad8ff 100644 --- a/src/test/setup_common.cpp +++ b/src/test/setup_common.cpp @@ -143,8 +143,9 @@ TestingSetup::TestingSetup(const std::string& chainName) : BasicTestingSetup(cha ::ChainstateActive().InitCoinsDB( /* cache_size_bytes */ 1 << 23, /* in_memory */ true, /* should_wipe */ false); auto& consensus = chainparams.GetConsensus(); - pclaimTrie = new CClaimTrie(true, 0, - (GetDataDir() / "claimtrie").string(), + auto dataDir = GetDataDir() / "claimtrie"; + TryCreateDirectories(dataDir); + pclaimTrie = new CClaimTrie(true, 0, dataDir.string(), consensus.nNormalizedNameForkHeight, consensus.nOriginalClaimExpirationTime, consensus.nExtendedClaimExpirationTime,