mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
Add some additional comments about BitcoindRPCCheck infra
This commit is contained in:
parent
62c56f446a
commit
abb7b015d8
1 changed files with 11 additions and 2 deletions
|
|
@ -2212,6 +2212,13 @@ void ThreadScriptCheck() {
|
||||||
scriptcheckqueue.Thread();
|
scriptcheckqueue.Thread();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* This function has two major purposes:
|
||||||
|
* 1) Checks that the RPC connection to the parent chain node
|
||||||
|
* can be attained, and is returning back reasonable answers.
|
||||||
|
* 2) Re-evaluates a list of blocks that have been deemed "bad"
|
||||||
|
* from the perspective of peg-in witness validation. Blocks are
|
||||||
|
* added to this queue in ConnectTip based on the error code returned.
|
||||||
|
*/
|
||||||
bool BitcoindRPCCheck(const bool init)
|
bool BitcoindRPCCheck(const bool init)
|
||||||
{
|
{
|
||||||
//First, we can clear out any blocks thatsomehow are now deemed valid
|
//First, we can clear out any blocks thatsomehow are now deemed valid
|
||||||
|
|
@ -3230,8 +3237,10 @@ bool static ConnectTip(CValidationState& state, const CChainParams& chainparams,
|
||||||
if (!rv) {
|
if (!rv) {
|
||||||
if (state.IsInvalid()) {
|
if (state.IsInvalid()) {
|
||||||
InvalidBlockFound(pindexNew, state);
|
InvalidBlockFound(pindexNew, state);
|
||||||
//Possibly result of RPC to bitcoind failure
|
// Possibly result of RPC to bitcoind failure
|
||||||
//or unseen Bitcoin blocks.
|
// or unseen Bitcoin blocks.
|
||||||
|
// These blocks are later re-evaluated at an interval
|
||||||
|
// set by `-recheckpeginblockinterval`.
|
||||||
if (state.GetRejectCode() == REJECT_PEGIN) {
|
if (state.GetRejectCode() == REJECT_PEGIN) {
|
||||||
//Write queue of invalid blocks that
|
//Write queue of invalid blocks that
|
||||||
//must be cleared to continue operation
|
//must be cleared to continue operation
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue