Skip to content

Commit

Permalink
Merge ElementsProject#910: Fix mainchain RPC warmup message
Browse files Browse the repository at this point in the history
6b9c31e Fix mainchain RPC warmup message (Steven Roose)

Pull request description:

Tree-SHA512: 357c74b3396e40c39065f7ce4830fd2756731e19d303a0075157d2b1ecef80bacdbfe2693977f16392215481794081b15fec772f946b95cfbec45313309f78c6
  • Loading branch information
stevenroose committed Sep 28, 2020
2 parents bca68fe + 6b9c31e commit ec9b28e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1884,6 +1884,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 a 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
Expand Down
1 change: 0 additions & 1 deletion src/validation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5294,7 +5294,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 {
Expand Down

0 comments on commit ec9b28e

Please sign in to comment.