Page MenuHomePhabricator

Merge #14364: doc: Clarify -blocksdir usage
ClosedPublic

Authored by markblundeberg on May 20 2019, 18:24.

Details

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

Diff Detail

Repository
rABC Bitcoin ABC
Branch
PR14364
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 5908
Build 9876: Bitcoin ABC Buildbot (legacy)
Build 9875: arc lint + arc unit

Event Timeline

This revision is now accepted and ready to land.May 21 2019, 15:36