diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2018-03-27 21:04:22 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2018-03-27 21:22:36 +0200 |
commit | 534b8fa560a700c0641e2700b92e40dc1a0066aa (patch) | |
tree | 6a2ca3e48623d16c33ebca8507af17d0a0c894dc /src/validation.h | |
parent | b648974cc35a65df87c2801f5c09dd13d3e507f7 (diff) | |
parent | a1926362ecb3c354ae338ef7d7020daf78f980c9 (diff) |
Merge #12653: Allow to optional specify the directory for the blocks storage
a192636 -blocksdir: keep blockindex leveldb database in datadir (Jonas Schnelli)
f38e4fd QA: Add -blocksdir test (Jonas Schnelli)
386a6b6 Allow to optional specify the directory for the blocks storage (Jonas Schnelli)
Pull request description:
Since the actual block files taking up more and more space, it may be desirable to have them stored in a different location then the data directory (use case: SSD for chainstate, etc., HD for blocks).
This PR adds a `-blocksdir` option that allows one to keep the blockfiles and the blockindex external from the data directory (instead of creating symlinks).
I fist had an option to keep the blockindex within the datadir, but seems to make no sense since accessing the index will (always) lead to access (r/w) the block files.
Tree-SHA512: f8b9e1a681679eac25076dc30e45e6e12d4b2d9ac4be907cbea928a75af081dbcb0f1dd3e97169ab975f73d0bd15824c00c2a34638f3b284b39017171fce2409
Diffstat (limited to 'src/validation.h')
-rw-r--r-- | src/validation.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/validation.h b/src/validation.h index e780f453b2..4596879771 100644 --- a/src/validation.h +++ b/src/validation.h @@ -254,7 +254,7 @@ bool ProcessNewBlock(const CChainParams& chainparams, const std::shared_ptr<cons bool ProcessNewBlockHeaders(const std::vector<CBlockHeader>& block, CValidationState& state, const CChainParams& chainparams, const CBlockIndex** ppindex=nullptr, CBlockHeader *first_invalid=nullptr); /** Check whether enough disk space is available for an incoming block */ -bool CheckDiskSpace(uint64_t nAdditionalBytes = 0); +bool CheckDiskSpace(uint64_t nAdditionalBytes = 0, bool blocks_dir = false); /** Open a block file (blk?????.dat) */ FILE* OpenBlockFile(const CDiskBlockPos &pos, bool fReadOnly = false); /** Translation to a filesystem path */ |