From c0e7cf64eb57ada7ce15ec8a20c4bb01bfa04192 Mon Sep 17 00:00:00 2001 From: Steven Roose Date: Mon, 21 Sep 2020 17:57:15 +0200 Subject: [PATCH] Fix mainchain RPC warmup message --- src/init.cpp | 3 +++ src/validation.cpp | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/init.cpp b/src/init.cpp index 1db635e00f..7e847479cd 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1877,6 +1877,9 @@ bool AppInitMain(InitInterfaces& interfaces) SetRPCWarmupFinished(); // ELEMENTS: + if (gArgs.GetBoolArg("-validatepegin", Params().GetConsensus().has_parent_chain)) { + uiInterface.InitMessage(_("Awaiting mainchain RPC warmup")); + } 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 diff --git a/src/validation.cpp b/src/validation.cpp index aa890b4822..3c5694e3d9 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -5288,7 +5288,6 @@ bool MainchainRPCCheck(const bool init) // Next, check for working and valid rpc if (gArgs.GetBoolArg("-validatepegin", Params().GetConsensus().has_parent_chain)) { - uiInterface.InitMessage(_("Awaiting mainchain RPC warmup")); // During init try until a non-RPC_IN_WARMUP result while (true) { try {