This commit is contained in:
jl777
2016-10-25 10:13:48 -03:00
parent b62d7030ef
commit d9d3a941ff
2 changed files with 2 additions and 1 deletions

View File

@@ -26,6 +26,7 @@
int32_t komodo_stateupdate(int32_t height,uint8_t notarypubs[][33],uint8_t numnotaries,uint8_t notaryid,uint256 txhash,uint64_t voutmask,uint8_t numvouts,uint32_t *pvals,uint8_t numpvals);
void komodo_init();
int32_t komodo_notarizeddata(int32_t nHeight,uint256 *notarized_hashp,uint256 *notarized_desttxidp);
int32_t NOTARIZED_HEIGHT,Num_nutxos;
uint256 NOTARIZED_HASH,NOTARIZED_DESTTXID;

View File

@@ -87,7 +87,7 @@ int32_t komodo_checkpoint(int32_t *notarized_heightp,int32_t nHeight,uint256 has
int32_t notarized_height; uint256 notarized_hash,notarized_desttxid; CBlockIndex *notary;
notarized_height = komodo_notarizeddata(chainActive.Tip()->nHeight,&notarized_hash,&notarized_desttxid);
*notarized_heightp = notarized_height;
if ( notarized_height >= 0 && notarized_height <= activeChain.Tip()->nHeight && (notary= mapBlockIndex[notarized_hash]) != 0 )
if ( notarized_height >= 0 && notarized_height <= chainActive.Tip()->nHeight && (notary= mapBlockIndex[notarized_hash]) != 0 )
{
//printf("nHeight.%d -> (%d %s)\n",chainActive.Tip()->nHeight,notarized_height,notarized_hash.ToString().c_str());
if ( notary->nHeight == notarized_height ) // if notarized_hash not in chain, reorg