mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-15 12:51:00 +02:00
util: warn if reindex is used in conf
using reindex in a conf file can lead to the node reindexing on every restart. we still allow it but throw a warning.
This commit is contained in:
parent
5e744f4238
commit
2e3826cbcd
1 changed files with 6 additions and 0 deletions
|
|
@ -940,6 +940,12 @@ bool IsConfSupported(KeyInfo& key, std::string& error) {
|
|||
error = "conf cannot be set in the configuration file; use includeconf= if you want to include additional config files";
|
||||
return false;
|
||||
}
|
||||
if (key.name == "reindex") {
|
||||
// reindex can be set in a config file but it is strongly discouraged as this will cause the node to reindex on
|
||||
// every restart. Allow the config but throw a warning
|
||||
LogPrintf("Warning: reindex=1 is set in the configuration file, which will significantly slow down startup. Consider removing or commenting out this option for better performance, unless there is currently a condition which makes rebuilding the indexes necessary\n");
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue