Test datadir in conf file exists
Summary:
If a custom data directory is specified using -datadir argument, its
existence is checked before the conf file is loaded. But if the conf
file then specifies a different non-existent datadir, that isn't tested,
and results in esoteric errors
Backport of core PR11829
Test Plan:
Run bitcoind -datadir=<dir> in the following conditions:
- <dir> exists, check it works
- <dir> does not exist, check it fails
Now create a config file with the line datadir=<conf_dir> and run
bitcoind -datadir=<dir> -conf=<path_to_config_file>:
- <dir> exists, but not <config_dir>, check it works
- <dir> does not exist, but <config_dir> exists, check it fails
All the failure should display an error in the console: "specified data
directory (...) does not exist"
Reviewers: #bitcoin_abc, deadalnix, jasonbcox
Reviewed By: #bitcoin_abc, jasonbcox
Subscribers: teamcity, schancel
Differential Revision: https://reviews.bitcoinabc.org/D2277