Page MenuHomePhabricator

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

Authored by markblundeberg on Mon, May 20, 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.Mon, May 20, 18:20
Herald added a reviewer: Restricted Project. · View Herald TranscriptMon, May 20, 18:20
markblundeberg planned changes to this revision.Mon, May 20, 18:35

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

markblundeberg planned changes to this revision.Tue, May 21, 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.Tue, Jun 11, 00:25
markblundeberg edited the summary of this revision. (Show Details)
markblundeberg updated this revision to Diff 9376.

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

Fabien requested changes to this revision.Thu, Jun 13, 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.Thu, Jun 13, 07:57
markblundeberg marked an inline comment as done.Thu, Jun 13, 14:04
markblundeberg updated this revision to Diff 9394.

take out accidental backported line

markblundeberg added inline comments.Thu, Jun 13, 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.Fri, Jun 14, 06:37
This revision is now accepted and ready to land.Fri, Jun 14, 06:37

rebase pre-land