HomePhabricator

Merge #14364: doc: Clarify -blocksdir usage

Description

Merge #14364: doc: Clarify -blocksdir usage

Summary:
PR14364 backport https://github.com/bitcoin/bitcoin/pull/14364/files
ccc27bdcd2 doc: Clarify -blocksdir usage (Daniel McNally)

Pull request description:

This PR attempts to clarify and correct the `-blocksdir` argument description and default value. `-blocksdir` does not refer to the full path to the actual `blocks` directory, but rather the root/parent directory which contains the `blocks` directory. Accordingly, the default value is `<datadir>` and not `<datadir>/blocks` - this behavior of defaulting to the datadir can also be seen in init.cpp:

```cpp
    if (gArgs.IsArgSet("-blocksdir")) {
        path = fs::system_complete(gArgs.GetArg("-blocksdir", ""));
        if (!fs::is_directory(path)) {
            path = "";
            return path;
        }
    } else {
        path = GetDataDir(false);
    }
```

It also attempts to clarify that only the `.dat` files containing block data are impacted by `-blocksdir`, not the index files.

I believe this would close #12828.

ACKs for commit ccc27b:

hebasto:
  utACK ccc27bdcd2d91fe2c023ad004019d5b970f21dbf

Test Plan: make check

Reviewers: jasonbcox, Fabien, #bitcoin_abc, deadalnix, Mengerian

Reviewed By: Fabien, #bitcoin_abc

Differential Revision: https://reviews.bitcoinabc.org/D3077

Details

Provenance
MarcoFalke <falke.marco@gmail.com>Authored on May 13 2019, 16:45
Mark Lundeberg <36528214+markblundeberg@users.noreply.github.com>Committed on May 21 2019, 15:38
markblundebergPushed on May 21 2019, 15:38
Reviewer
Restricted Project
Differential Revision
D3077: Merge #14364: doc: Clarify -blocksdir usage
Parents
rABC4c2024cfdb6a: New -includeconf argument for including external configuration files
Branches
Unknown
Tags
Unknown

Event Timeline

Mark Lundeberg <36528214+markblundeberg@users.noreply.github.com> committed rABC0839e1e1befd: Merge #14364: doc: Clarify -blocksdir usage (authored by MarcoFalke <falke.marco@gmail.com>).May 21 2019, 15:38