KOMODO_CONNECTING

This commit is contained in:
jl777
2018-08-19 04:28:41 -11:00
parent 799f664f5f
commit 8b26f1169c
4 changed files with 6 additions and 2 deletions

View File

@@ -56,7 +56,7 @@ using namespace std;
CCriticalSection cs_main;
extern uint8_t NOTARY_PUBKEY33[33];
extern int32_t KOMODO_LOADINGBLOCKS,KOMODO_LONGESTCHAIN,KOMODO_INSYNC;
extern int32_t KOMODO_LOADINGBLOCKS,KOMODO_LONGESTCHAIN,KOMODO_INSYNC,KOMODO_CONNECTING;
int32_t KOMODO_NEWBLOCKS;
int32_t komodo_block2pubkey33(uint8_t *pubkey33,CBlock *block);
void komodo_broadcast(CBlock *pblock,int32_t limit);
@@ -3448,6 +3448,7 @@ bool static ConnectTip(CValidationState &state, CBlockIndex *pindexNew, CBlock *
return AbortNode(state, "Failed to read block");
pblock = █
}
KOMODO_CONNECTING = (int32_t)pindexNew->nHeight;
// Get the current commitment tree
ZCIncrementalMerkleTree oldTree;
assert(pcoinsTip->GetAnchorAt(pcoinsTip->GetBestAnchor(), oldTree));
@@ -3458,6 +3459,7 @@ bool static ConnectTip(CValidationState &state, CBlockIndex *pindexNew, CBlock *
{
CCoinsViewCache view(pcoinsTip);
bool rv = ConnectBlock(*pblock, state, pindexNew, view, false, true);
KOMODO_CONNECTING = -1;
GetMainSignals().BlockChecked(*pblock, state);
if (!rv) {
if (state.IsInvalid())