This commit is contained in:
jl777
2016-11-10 11:30:51 -03:00
parent ba7babedc4
commit bbee6596da
2 changed files with 3 additions and 1 deletions

View File

@@ -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 )

View File

@@ -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);