HomePhabricator

Test datadir in conf file exists

Description

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:

  1. <dir> exists, check it works
  2. <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>:

  1. <dir> exists, but not <config_dir>, check it works
  2. <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

Details

Provenance
MeshCollider <dobsonsa68@gmail.com>Authored on Dec 5 2017, 11:24
FabienCommitted on Jan 10 2019, 20:11
FabienPushed on Jan 10 2019, 20:11
Reviewer
Restricted Project
Differential Revision
D2277: Test datadir in conf file exists
Parents
rABCc57f186650e4: Update version to 0.18.7
Branches
Unknown
Tags
Unknown

Event Timeline