Page MenuHomePhabricator

Merge #14409: utils and libraries: Make 'blocksdir' always net specific
ClosedPublic

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

Details

Summary

PR14409 backport https://github.com/bitcoin/bitcoin/pull/14409/files
e4a0c3547ed886871f8b3d51c6b4ffdb181a8b9c Improve blocksdir functional test. (Hennadii Stepanov)
c3f1821ac788e522e7558e3575150433450dcb8c Make blockdir always net specific (Hennadii Stepanov)

Pull request description:

The blocks directory is net specific by definition.

Also this prevents the side effect of calling `GetBlocksDir(false)` in the non-mainnet environment.
Currently a new node creates an unused `blocks\` directory in the root of the data directory when `-testnet` or `-regtest` is specified.

Depends on D3312

Test Plan

make check
test_runner.py

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

markblundeberg created this revision.May 20 2019, 18:20
Herald added a reviewer: Restricted Project. · View Herald TranscriptMay 20 2019, 18:20
markblundeberg planned changes to this revision.May 20 2019, 18:35

Very confusing build failure ... will return at a later date.

markblundeberg planned changes to this revision.May 21 2019, 15:53

This appears to be getting further along now, but still errors out on my machine.

still awful

markblundeberg planned changes to this revision.Jun 11 2019, 00:25
markblundeberg edited the summary of this revision. (Show Details)

finally found the bug that was making tests fail! (D3312)

Fabien requested changes to this revision.Jun 13 2019, 07:57
Fabien added inline comments.
src/init.cpp
1440 ↗(On Diff #9376)

This one is a missing dependency: https://github.com/bitcoin/bitcoin/pull/13775/files.

This revision now requires changes to proceed.Jun 13 2019, 07:57
markblundeberg marked an inline comment as done.

take out accidental backported line

markblundeberg added inline comments.Jun 13 2019, 14:06
src/init.cpp
1440 ↗(On Diff #9376)

Yep, looks like that depends on #12560 though, so I'll just work around that for now. No worries about regression if backporting 13775 accidentally restores GetBlocksDir(false), since it will make obvious compiler error.

Fabien accepted this revision.Jun 14 2019, 06:37
This revision is now accepted and ready to land.Jun 14 2019, 06:37

rebase pre-land