This commit is contained in:
jl777
2018-11-08 04:46:51 -11:00
parent 2bbf50e165
commit 0ba20c202a
2 changed files with 9 additions and 5 deletions

View File

@@ -391,7 +391,7 @@ int64_t CCduration(int32_t &numblocks,uint256 txid)
}
else if ( hashBlock == zeroid )
{
fprintf(stderr,"CCduration no hashBlock for txid %s\n",uint256_str(str,txid));
//fprintf(stderr,"CCduration no hashBlock for txid %s\n",uint256_str(str,txid));
return(0);
}
else if ( (pindex= mapBlockIndex[hashBlock]) == 0 || (txtime= pindex->nTime) == 0 || (txheight= pindex->nHeight) <= 0 )
@@ -401,7 +401,8 @@ int64_t CCduration(int32_t &numblocks,uint256 txid)
}
else if ( (pindex= chainActive.LastTip()) == 0 || pindex->nTime < txtime || pindex->nHeight <= txheight )
{
fprintf(stderr,"CCduration backwards timestamps %u %u for txid %s hts.(%d %d)\n",(uint32_t)pindex->nTime,txtime,uint256_str(str,txid),txheight,(int32_t)pindex->nHeight);
if ( pindex->nTime < txtime )
fprintf(stderr,"CCduration backwards timestamps %u %u for txid %s hts.(%d %d)\n",(uint32_t)pindex->nTime,txtime,uint256_str(str,txid),txheight,(int32_t)pindex->nHeight);
return(0);
}
numblocks = (pindex->nHeight - txheight);