From bbee6596dae7f32b19c9b5351a964ae27d338355 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 10 Nov 2016 11:30:51 -0300 Subject: [PATCH] test --- src/komodo.h | 2 +- src/main.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/komodo.h b/src/komodo.h index 7119f9b88..c1ecde069 100644 --- a/src/komodo.h +++ b/src/komodo.h @@ -362,7 +362,7 @@ void komodo_connectblock(CBlockIndex *pindex,CBlock& block) printf("hwmheight.%d vs pindex->nHeight.%d reorg.%d\n",hwmheight,pindex->nHeight,hwmheight-pindex->nHeight); // reset komodostate } - CURRENT_HEIGHT = pindex->nHeight; + CURRENT_HEIGHT = chainActive.Tip()->nHeight; if ( komodo_is_issuer() != 0 ) { while ( KOMODO_REALTIME == 0 || time(NULL) <= KOMODO_REALTIME ) diff --git a/src/main.cpp b/src/main.cpp index 8ce789b26..899a63c5b 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3315,7 +3315,9 @@ static bool IsSuperMajority(int minVersion, const CBlockIndex* pstart, unsigned bool ProcessNewBlock(int32_t height,CValidationState &state, CNode* pfrom, CBlock* pblock, bool fForceProcessing, CDiskBlockPos *dbp) { // Preliminary checks + extern int32_t CURRENT_HEIGHT; bool checked; + CURRENT_HEIGHT = chainActive.Tip()->nHeight; if ( ASSETCHAINS_SYMBOL[0] == 0 ) checked = CheckBlock(height!=0?height:komodo_block2height(pblock),0,*pblock, state); else checked = CheckBlock(0,0,*pblock, state);