-
Notifications
You must be signed in to change notification settings - Fork 38.7k
-datadir or -datadir="" option implies default datadir #16416
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
ping @ryanofsky |
76bccef to
a6ca963
Compare
|
This seems ok. I think it could make sense for Or alternately, it could make sense for -nodatadir to print an error, because it's similar enough to -nowallet, -nowalletdir, -nopid, -norpccookiefile options where you might want to be able to disable bitcoin from creating files & directories, but different from those options because bitcoin can't function without a datadir. In either case, I think the PR description here should be updated to be more self contained. I think an ideal PR description would first say what the change in behavior is, then give reasons for the change, and only then go into deeper history and assigning credit for ideas, to be comprehensible as possible without digging into previous discussion. Also a change like this should have release notes. |
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsNo conflicts as of last run. |
The PR description has been updated. |
|
I would rather see just
|
|
Each arg could have a flag whether it can be negated or not. For instance |
You and @ryanofsky have convinced me. Going to implement your suggestion tonight.
Could you look into #16097? |
-datadir or -datadir="" in command line will set the default datadir (overriding config file options).
a6ca963 to
3a1ea8e
Compare
|
@ryanofsky and @promag Thank you for your reviews.
Done. The OP has been updated.
I'd rather use a more general solution like #16097. |
|
Closed in favor of #15864. See: 740d41c#r306906349 |
This PR introduces a new behavior for
-datadir(w/o a value) or-datadir="": it means "use the default one". It allows to unset adatadiroption specified in the config file by passing-datadiror-datadir=""as a command line option.Credits:
This PR is inspired by ryanofsky's idea:
The more general approach, however, has been described by ryanofsky here.