Skip to content

Commit 5d7cd6b

Browse files
committed
parameterize the rpc re-checking of peg-in validation failed blocks
1 parent ba8d498 commit 5d7cd6b

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/init.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -520,6 +520,7 @@ std::string HelpMessage(HelpMessageMode mode)
520520
strUsage += HelpMessageOpt("-parentscriptprefix", strprintf(_("The byte prefix, in decimal, of the parent chain's base58 script address. (default: %d)"), 196));
521521
strUsage += HelpMessageOpt("-con_parent_chain_signblockscript", _("Whether parent chain uses pow or signed blocks. If the parent chain uses signed blocks, the challenge (scriptPubKey) script. If not, an empty string. (default: empty script [ie parent uses pow])"));
522522
strUsage += HelpMessageOpt("-con_parent_pegged_asset=<hex>", _("Asset ID (hex) for pegged asset for when parent chain has CA. (default: 0x00)"));
523+
strUsage += HelpMessageOpt("-recheckpeginblockinterval", strprintf(_("The interval in seconds at which a peg-in witness failing block is re-evaluated in case of intermittant peg-in witness failure. 0 means never. (default: %u)"), 120));
523524
}
524525
strUsage += HelpMessageOpt("-validatepegin", strprintf(_("Validate peg-in claims. An RPC connection will be attempted to the trusted bitcoind using the `mainchain*` settings below. All functionaries must run this enabled. (default: %u)"), DEFAULT_VALIDATE_PEGIN));
525526
strUsage += HelpMessageOpt("-mainchainrpchost=<addr>", strprintf("The address which the daemon will try to connect to the trusted bitcoind to validate peg-ins, if enabled. (default: cookie auth)"));
@@ -1691,7 +1692,10 @@ bool AppInitMain(boost::thread_group& threadGroup, CScheduler& scheduler)
16911692
SetRPCWarmupFinished();
16921693

16931694
CScheduler::Function f2 = boost::bind(&BitcoindRPCCheck, false);
1694-
scheduler.scheduleEvery(f2, 120);
1695+
unsigned int check_rpc_every = GetArg("-recheckpeginblockinterval", 120);
1696+
if (check_rpc_every) {
1697+
scheduler.scheduleEvery(f2, check_rpc_every);
1698+
}
16951699

16961700
uiInterface.InitMessage(_("Awaiting bitcoind RPC warmup"));
16971701

0 commit comments

Comments
 (0)