mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
When RPC server disabled, only warn on validatepegin failure
This commit is contained in:
parent
0d2832a6d1
commit
674f3c7473
1 changed files with 11 additions and 4 deletions
15
src/init.cpp
15
src/init.cpp
|
|
@ -1883,10 +1883,17 @@ bool AppInitMain(InitInterfaces& interfaces)
|
|||
|
||||
// ELEMENTS:
|
||||
uiInterface.InitMessage(_("Awaiting mainchain RPC warmup"));
|
||||
if (!MainchainRPCCheck(true)) { //Initial check, fail immediately
|
||||
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.")
|
||||
+ "\n\n"
|
||||
+ 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 (!MainchainRPCCheck(true)) { //Initial check only
|
||||
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";
|
||||
// We fail immediately if this node has RPC server enabled
|
||||
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue