Browse Source

Merge branch 'dev' into dpow_fixes

pull/138/head
FireMartZ 6 years ago
committed by GitHub
parent
commit
24d34da50c
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      src/komodo_validation011.h

5
src/komodo_validation011.h

@ -108,7 +108,7 @@ int32_t gettxout_scriptPubKey(int32_t height,uint8_t *scriptPubKey,int32_t maxsi
}
}
if ( &tx != 0 && n >= 0 && n <= (int32_t)tx.vout.size() ) // vout.size() seems off by 1
if ( &tx != 0 && n >= 0 && n < (int32_t)tx.vout.size() )
{
ptr = (uint8_t *)tx.vout[n].scriptPubKey.data();
m = tx.vout[n].scriptPubKey.size();
@ -1093,8 +1093,9 @@ int32_t komodo_checkpoint(int32_t *notarized_heightp,int32_t nHeight,uint256 has
return(-1);
notarized_height = komodo_notarizeddata(pindex->nHeight,&notarized_hash,&notarized_desttxid);
*notarized_heightp = notarized_height;
if ( notarized_height >= 0 && notarized_height <= pindex->nHeight && (notary= mapBlockIndex[notarized_hash]) != 0 )
if ( notarized_height >= 0 && notarized_height <= pindex->nHeight && mapBlockIndex.count(notarized_hash) != 0 )
{
notary = mapBlockIndex[notarized_hash];
printf("nHeight.%d -> (%d %s)\n",pindex->nHeight,notarized_height,notarized_hash.ToString().c_str());
if ( notary->nHeight == notarized_height ) // if notarized_hash not in chain, reorg
{

Loading…
Cancel
Save