util: Simplify path argument for CBlockTreeDB ctor

This commit does not change behavior as GetBlocksDir() with unset 
"-blocksdir" returns the same path.
This commit is contained in:
Hennadii Stepanov 2019-10-05 09:38:56 +03:00
parent 7b701fef58
commit c2bb3919a8
No known key found for this signature in database
GPG key ID: 410108112E7EA81F

View file

@ -145,7 +145,7 @@ size_t CCoinsViewDB::EstimateSize() const
return db.EstimateSize(DB_COIN, (char)(DB_COIN+1));
}
CBlockTreeDB::CBlockTreeDB(size_t nCacheSize, bool fMemory, bool fWipe) : CDBWrapper(gArgs.IsArgSet("-blocksdir") ? GetDataDir() / "blocks" / "index" : GetBlocksDir() / "index", nCacheSize, fMemory, fWipe) {
CBlockTreeDB::CBlockTreeDB(size_t nCacheSize, bool fMemory, bool fWipe) : CDBWrapper(GetDataDir() / "blocks" / "index", nCacheSize, fMemory, fWipe) {
}
bool CBlockTreeDB::ReadBlockFileInfo(int nFile, CBlockFileInfo &info) {