This commit is contained in:
jl777
2017-02-02 16:21:37 +02:00
parent bf35c083b0
commit dd278be29a
3 changed files with 8 additions and 2 deletions

View File

@@ -605,6 +605,11 @@ void komodo_connectpindex(CBlockIndex *pindex)
komodo_connectblock(pindex,block);
}
void *komodo_chainactive(int32_t height)
{
return(chainActive[height]);
}
int32_t komodo_notaries(uint8_t pubkeys[64][33],int32_t height);
int32_t komodo_electednotary(uint8_t *pubkey33,int32_t height);

View File

@@ -942,7 +942,7 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3
}
}
}
} else printf("n.%d from opreturns\n",n);
} //else printf("n.%d from opreturns\n",n);
//printf("extra.[%d] after %.8f\n",n,dstr(komodo_paxtotal()));
}
else if ( opretbuf[0] == 'X' )

View File

@@ -107,6 +107,7 @@ bool CheckEquihashSolution(const CBlockHeader *pblock, const CChainParams& param
int32_t komodo_chosennotary(int32_t *notaryidp,int32_t height,uint8_t *pubkey33);
int32_t komodo_is_special(int32_t height,uint8_t pubkey33[33]);
int32_t komodo_currentheight();
void *komodo_chainactive(int32_t height);
int8_t komodo_minerid(int32_t height,uint8_t *pubkey33);
extern int32_t KOMODO_CHOSEN_ONE;
#define KOMODO_ELECTION_GAP 2000
@@ -157,7 +158,7 @@ bool CheckProofOfWork(int32_t height,uint8_t *pubkey33,uint256 hash, unsigned in
if ( UintToArith256(hash) > bnTarget )
{
{
if ( height > 180000 && KOMODO_REWIND == 0 )
if ( height > 180000 && KOMODO_REWIND == 0 && komodo_chainactive(height) != 0 )
{
int32_t i;
for (i=31; i>=0; i--)