Page MenuHomePhabricator

[backport] init: Use InitError for all errors in bitcoind/qt and Fix datadir handling
AbandonedPublic

Authored by majcosta on Apr 20 2020, 08:27.

Details

Reviewers
Fabien
deadalnix
Group Reviewers
Restricted Project
Summary

Merge #16366: init: Use InitError for all errors in bitcoind/qt

fa6f402 Call node->initError instead of InitError from GUI code (Russell Yanofsky)
fad2502 init: Use InitError for all errors in bitcoind/qt (MarcoFalke)

Pull request description:

Using the same InitError for startup error in the daemon and the gui makes it possible to run the tests with the gui again:

BITCOIND=bitcoin-qt ./test/functional/test_runner.py feature_includeconf feature_config_args

Merge bitcoin#15864: Fix datadir handling

ffea41f Enable all tests in feature_config_args.py (Hennadii Stepanov)
66f5c17 Use CheckDataDirOption() for code uniformity (Hennadii Stepanov)
7e33a18 Fix datadir handling in bitcoin-cli (Hennadii Stepanov)
b28dada Fix datadir handling in bitcoin-qt (Hennadii Stepanov)
5082409 Fix datadir handling in bitcoind (Hennadii Stepanov)
740d41c Add CheckDataDirOption() function (Hennadii Stepanov)
c1f3251 Return absolute path early in AbsPathForConfigVal (Hennadii Stepanov)

Pull request description:

Fix bitcoin#15240, see: bitcoin#15240 (comment)
Fix bitcoin#15745
Fix broken `feature_config_args.py` tests (disabled by MarcoFalke/bitcoin-core@fabe28a). All test are enabled now.
This PR is alternative to bitcoin#13621.

User's `$HOME` directory is not touched unnecessarily now.

This is a backport of Core PR16366 and PR15864

Test Plan
ninja check
./test_runner.py feature_config_args.py feature_includeconf.py

Diff Detail

Repository
rABC Bitcoin ABC
Branch
initerror_rebase
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 10329
Build 18479: Default Diff Build & Tests
Build 18478: arc lint + arc unit

Event Timeline

Fabien requested changes to this revision.Apr 20 2020, 08:49
Fabien added a subscriber: Fabien.

This depends on PR16205, please backport it first.

src/bitcoind.cpp
28 ↗(On Diff #18944)

This is removed in the PR, is it still needed ?

This revision now requires changes to proceed.Apr 20 2020, 08:49

rebased onto master, removed spurious <cstdio> header

deadalnix requested changes to this revision.Apr 20 2020, 23:14
deadalnix added a subscriber: deadalnix.
deadalnix added inline comments.
src/qt/bitcoin.cpp
64 ↗(On Diff #18971)

Remove

570 ↗(On Diff #18971)

You are missing an initError here

test/functional/feature_config_args.py
133 ↗(On Diff #18971)

Where is that from?

This revision now requires changes to proceed.Apr 20 2020, 23:14

corrected mistakes and included PR15864 which fixes feature_config_args.py

majcosta retitled this revision from [backport#16366] init: Use InitError for all errors in bitcoind/qt to [backport] init: Use InitError for all errors in bitcoind/qt and Fix datadir handling.Apr 21 2020, 03:44
majcosta edited the summary of this revision. (Show Details)
Fabien requested changes to this revision.Apr 22 2020, 07:52
Fabien added inline comments.
src/bitcoind.cpp
28

You added it back

This revision now requires changes to proceed.Apr 22 2020, 07:52
deadalnix requested changes to this revision.Apr 22 2020, 16:08

ok you need to keep the PR separated. They are clearly doing two different things.

Now, PR16366 breaks feature_config_args.py and PR15864 fixes it It's all good, but that simply means you just pick the part that fix the test from PR15864. This way things can be reviewed properly. It is easy to see where the diff differed from the PR, and hopefully there is an explanation in the diff's description as to why that is.