Retry bitcoind RPC connection upon warmup error code return

This commit is contained in:
Gregory Sanders 2016-12-07 11:16:25 -05:00
parent 5c73580718
commit 15dadcd970
2 changed files with 31 additions and 17 deletions

View file

@ -1667,6 +1667,8 @@ bool AppInitMain(boost::thread_group& threadGroup, CScheduler& scheduler)
CScheduler::Function f2 = boost::bind(&BitcoindRPCCheck, false);
scheduler.scheduleEvery(f2, 120);
uiInterface.InitMessage(_("Awaiting bitcoind RPC warmup"));
if (!BitcoindRPCCheck(true)) { //Initial check, fail immediately
return InitError(_("ERROR: liquid-daemon is set to verify pegins but cannot get valid response from bitcoind. Please check debug.log for more information."));
}