mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 23:18:14 +01:00
settings: add auto-generated warning msg for editing the file manually
Hopefully, refraining users from modifying the file unless they are certain about the potential consequences. Co-authored-by: Ryan Ofsky <ryan@ofsky.org>
This commit is contained in:
@@ -61,7 +61,11 @@ void OptionTests::migrateSettings()
|
||||
QVERIFY(!settings.contains("addrSeparateProxyTor"));
|
||||
|
||||
std::ifstream file(gArgs.GetDataDirNet() / "settings.json");
|
||||
std::string default_warning = strprintf("This file is automatically generated and updated by %s. Please do not edit this file while the node "
|
||||
"is running, as any changes might be ignored or overwritten.",
|
||||
PACKAGE_NAME);
|
||||
QCOMPARE(std::string(std::istreambuf_iterator<char>(file), std::istreambuf_iterator<char>()).c_str(), "{\n"
|
||||
" \"_warning_\": \""+ default_warning+"\",\n"
|
||||
" \"dbcache\": \"600\",\n"
|
||||
" \"listen\": false,\n"
|
||||
" \"onion\": \"onion:234\",\n"
|
||||
|
||||
Reference in New Issue
Block a user