Page MenuHomePhabricator

[backport PR12653] Allow to optional specify the directory for the blocks storage
ClosedPublic

Authored by markblundeberg on May 6 2019, 04:02.

Details

Summary

from: https://github.com/bitcoin/bitcoin/pull/12653/files
a1926362e -blocksdir: keep blockindex leveldb database in datadir
f38e4fdb0 QA: Add -blocksdir test
386a6b62a Allow to optional specify the directory for the blocks storage

also includes bugfix PR15124 (Ben Woosley)
ba8c8b2227 Fail if either disk space check fails

Test Plan

make check
test_runner.py

  • manual testing on testnet

Diff Detail

Repository
rABC Bitcoin ABC
Branch
PR12653
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 5787
Build 9636: Bitcoin ABC Buildbot (legacy)
Build 9635: arc lint + arc unit

Event Timeline

Note, there are some future backports that should be done relating to this (but can't be done yet), see T636 description.

On further thought I think manual testing would be a good idea here, since /in theory/ it's possible that some codebase divergence means there could be a GetDataDir() somewhere else that needs to be changed over.

markblundeberg edited the test plan for this revision. (Show Details)

rebase & did test on testnet

On further thought I think manual testing would be a good idea here, since /in theory/ it's possible that some codebase divergence means there could be a GetDataDir() somewhere else that needs to be changed over.

I checked for other GetDataDir invocations and none are relevant to blocks. + tested on regtest / testnet

BTW how this works: if you specify -blocksdir=/home/mark/spam then:

  • mainnet blocks will be under /home/mark/spam/blocks
  • testnet blocks will be under /home/mark/spam/testnet3/blocks

But index is still under the datadir, ie by default:

  • mainnet blockindex will be under /home/mark/.bitcoin/blocks/index
  • testnet blockindex will be under /home/mark/.bitcoin/testnet3/blocks/index
jasonbcox requested changes to this revision.May 9 2019, 20:52
jasonbcox added inline comments.
src/init.cpp
2264 ↗(On Diff #8528)

In the future, please don't do this unless the fix is strictly necessary. You can have two separate diffs get reviewed and wait to land them around the same time after they are both green'd.

src/util.cpp
693 ↗(On Diff #8528)

brackets

704 ↗(On Diff #8528)

brackets

This revision now requires changes to proceed.May 9 2019, 20:52
markblundeberg marked 3 inline comments as done.

rebase ; braces

src/init.cpp
2264 ↗(On Diff #8528)

OK, recalibrating. :-)

This revision is now accepted and ready to land.May 10 2019, 01:12