Speed up npoints
This commit is contained in:
@@ -331,6 +331,8 @@ int32_t komodo_notarizeddata(int32_t nHeight,uint256 *notarized_hashp,uint256 *n
|
|||||||
if ( sp->last_NPOINTSi < sp->NUM_NPOINTS && sp->last_NPOINTSi > 0 )
|
if ( sp->last_NPOINTSi < sp->NUM_NPOINTS && sp->last_NPOINTSi > 0 )
|
||||||
{
|
{
|
||||||
np = &sp->NPOINTS[sp->last_NPOINTSi-1];
|
np = &sp->NPOINTS[sp->last_NPOINTSi-1];
|
||||||
|
if ( np->nHeight < nHeight )
|
||||||
|
{
|
||||||
for (i=sp->last_NPOINTSi; i<sp->NUM_NPOINTS; i++)
|
for (i=sp->last_NPOINTSi; i<sp->NUM_NPOINTS; i++)
|
||||||
{
|
{
|
||||||
if ( sp->NPOINTS[i].nHeight >= nHeight )
|
if ( sp->NPOINTS[i].nHeight >= nHeight )
|
||||||
@@ -342,6 +344,7 @@ int32_t komodo_notarizeddata(int32_t nHeight,uint256 *notarized_hashp,uint256 *n
|
|||||||
sp->last_NPOINTSi = i;
|
sp->last_NPOINTSi = i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if ( flag == 0 )
|
if ( flag == 0 )
|
||||||
{
|
{
|
||||||
np = 0;
|
np = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user