mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-19 13:27:35 +02:00
When RPC server disabled, only warn on validatepegin failure
This commit is contained in:
parent
c53a313632
commit
2362c005f3
1 changed files with 11 additions and 4 deletions
15
src/init.cpp
15
src/init.cpp
|
|
@ -1876,10 +1876,17 @@ bool AppInitMain(InitInterfaces& interfaces)
|
||||||
|
|
||||||
// ELEMENTS:
|
// ELEMENTS:
|
||||||
uiInterface.InitMessage(_("Awaiting mainchain RPC warmup"));
|
uiInterface.InitMessage(_("Awaiting mainchain RPC warmup"));
|
||||||
if (!MainchainRPCCheck(true)) { //Initial check, fail immediately
|
if (!MainchainRPCCheck(true)) { //Initial check only
|
||||||
return InitError(_("ERROR: elementsd is set to verify pegins but cannot get valid response from the mainchain daemon. Please check debug.log for more information.")
|
const std::string err_msg = "ERROR: elements is set to verify pegins but cannot get valid response from the mainchain daemon. Please check debug.log for more information.\n\nIf you haven't setup a bitcoind please get the latest stable version from https://bitcoincore.org/en/download/ or if you do not need to validate pegins set in your elements configuration validatepegin=0";
|
||||||
+ "\n\n"
|
// We fail immediately if this node has RPC server enabled
|
||||||
+ strprintf(_("If you haven't setup a %s please get the latest stable version from %s or if you do not need to validate pegins set in your elements configuration %s"), "bitcoind", "https://bitcoincore.org/en/download/", "validatepegin=0"));
|
if (gArgs.GetBoolArg("-server", false)) {
|
||||||
|
InitError(err_msg);
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
// Or gently warn the user, and continue
|
||||||
|
InitWarning(err_msg);
|
||||||
|
gArgs.SoftSetArg("-validatepegin", "0");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Start the lightweight block re-evaluation scheduler thread
|
// Start the lightweight block re-evaluation scheduler thread
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue