diff options
author | Wladimir J. van der Laan <laanwj@protonmail.com> | 2019-10-08 11:47:06 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@protonmail.com> | 2019-10-08 11:47:24 +0200 |
commit | 9f8cd0ac892ba78a744e1a34e653e37f4f8f0b85 (patch) | |
tree | fdde59d257b8d3b085e97923052f0554eee25500 /src | |
parent | 99cebc922cba1590ea663d6ef3109c0cf2960b9d (diff) | |
parent | c2bb3919a8cc52ea35d424c1f31f9474f1ea4911 (diff) |
Merge #17059: util: Simplify path argument for CBlockTreeDB ctor
c2bb3919a8cc52ea35d424c1f31f9474f1ea4911 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 c2bb3919a8cc52ea35d424c1f31f9474f1ea4911
laanwj:
ACK c2bb3919a8cc52ea35d424c1f31f9474f1ea4911
promag:
ACK c2bb3919a8cc52ea35d424c1f31f9474f1ea4911.
Tree-SHA512: 646a0a3a31e2f419b05f696cbdfb7d8987f1d89ec0797b72464ae05680fd5f95f6469be0ea5b56f772434c49d48504cd9cf9760c05d4054d11349d502e157ee2
Diffstat (limited to 'src')
-rw-r--r-- | src/txdb.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/txdb.cpp b/src/txdb.cpp index 18be07e6db..536bfee901 100644 --- a/src/txdb.cpp +++ b/src/txdb.cpp @@ -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) { |