mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-15 12:51:00 +02:00
init: disallow reindex-chainstate when pruning
This fixes a bug where the node would be stuck in an endless loop when combining these parameters.
This commit is contained in:
parent
91d12344b1
commit
b2813980b8
2 changed files with 7 additions and 1 deletions
|
|
@ -853,12 +853,14 @@ bool AppInitParameterInteraction(const ArgsManager& args)
|
|||
nLocalServices = ServiceFlags(nLocalServices | NODE_COMPACT_FILTERS);
|
||||
}
|
||||
|
||||
// if using block pruning, then disallow txindex and coinstatsindex
|
||||
if (args.GetIntArg("-prune", 0)) {
|
||||
if (args.GetBoolArg("-txindex", DEFAULT_TXINDEX))
|
||||
return InitError(_("Prune mode is incompatible with -txindex."));
|
||||
if (args.GetBoolArg("-coinstatsindex", DEFAULT_COINSTATSINDEX))
|
||||
return InitError(_("Prune mode is incompatible with -coinstatsindex."));
|
||||
if (args.GetBoolArg("-reindex-chainstate", false)) {
|
||||
return InitError(_("Prune mode is incompatible with -reindex-chainstate. Use full -reindex instead."));
|
||||
}
|
||||
}
|
||||
|
||||
// If -forcednsseed is set to true, ensure -dnsseed has not been set to false
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue