mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 12:32:48 +01:00
-blocksdir: keep blockindex leveldb database in datadir
This commit is contained in:
parent
f38e4fdb06
commit
a1926362ec
@ -147,7 +147,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(GetBlocksDir() / "index", nCacheSize, fMemory, fWipe) {
|
||||
CBlockTreeDB::CBlockTreeDB(size_t nCacheSize, bool fMemory, bool fWipe) : CDBWrapper(gArgs.IsArgSet("-blocksdir") ? GetDataDir() / "blocks" / "index" : GetBlocksDir() / "index", nCacheSize, fMemory, fWipe) {
|
||||
}
|
||||
|
||||
bool CBlockTreeDB::ReadBlockFileInfo(int nFile, CBlockFileInfo &info) {
|
||||
|
@ -27,8 +27,8 @@ class BlocksdirTest(BitcoinTestFramework):
|
||||
self.start_node(0, ["-blocksdir="+self.options.tmpdir+ "/blocksdir"])
|
||||
self.log.info("mining blocks..")
|
||||
self.nodes[0].generate(10)
|
||||
assert(os.path.isfile(self.options.tmpdir+ "/blocksdir/regtest/blocks/blk00000.dat"))
|
||||
assert(os.path.isdir(self.options.tmpdir+ "/blocksdir/regtest/blocks/index"))
|
||||
assert(os.path.isfile(os.path.join(self.options.tmpdir, "blocksdir", "regtest", "blocks", "blk00000.dat")))
|
||||
assert(os.path.isdir(os.path.join(self.options.tmpdir, "node0", "regtest", "blocks", "index")))
|
||||
|
||||
if __name__ == '__main__':
|
||||
BlocksdirTest().main()
|
||||
|
Loading…
Reference in New Issue
Block a user