Skip to content

Commit 9f8cd0a

Browse files
committed
Merge bitcoin#17059: util: Simplify path argument for CBlockTreeDB ctor
c2bb391 util: Simplify path argument for CBlockTreeDB ctor (Hennadii Stepanov) Pull request description: This PR: - simplifies path argument (`datadir/blocks/index`) for `CBlockTreeDB` constructor - does not change behavior as `GetBlocksDir()` with unset "-blocksdir" returns the same path - improves code readability ACKs for top commit: MarcoFalke: ACK c2bb391 laanwj: ACK c2bb391 promag: ACK c2bb391. Tree-SHA512: 646a0a3a31e2f419b05f696cbdfb7d8987f1d89ec0797b72464ae05680fd5f95f6469be0ea5b56f772434c49d48504cd9cf9760c05d4054d11349d502e157ee2
2 parents 99cebc9 + c2bb391 commit 9f8cd0a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/txdb.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ size_t CCoinsViewDB::EstimateSize() const
145145
return db.EstimateSize(DB_COIN, (char)(DB_COIN+1));
146146
}
147147

148-
CBlockTreeDB::CBlockTreeDB(size_t nCacheSize, bool fMemory, bool fWipe) : CDBWrapper(gArgs.IsArgSet("-blocksdir") ? GetDataDir() / "blocks" / "index" : GetBlocksDir() / "index", nCacheSize, fMemory, fWipe) {
148+
CBlockTreeDB::CBlockTreeDB(size_t nCacheSize, bool fMemory, bool fWipe) : CDBWrapper(GetDataDir() / "blocks" / "index", nCacheSize, fMemory, fWipe) {
149149
}
150150

151151
bool CBlockTreeDB::ReadBlockFileInfo(int nFile, CBlockFileInfo &info) {

0 commit comments

Comments
 (0)