Cleanup code
This commit is contained in:
@@ -1738,27 +1738,18 @@ int32_t komodo_opretvalidate(int32_t nHeight,CScript scriptPubKey)
|
||||
fprintf(stderr,"vs prev maxflag.%d cmp error\n",maxflag);
|
||||
return(-1);
|
||||
} // else this is the good case we hope to happen
|
||||
} //else return(-1);
|
||||
} else return(-1);
|
||||
if ( lag < ASSETCHAINS_BLOCKTIME && Mineropret.size() >= PRICES_SIZEBIT0 )
|
||||
{
|
||||
memcpy(localbits,Mineropret.data(),Mineropret.size());
|
||||
if ( nHeight < 500 )
|
||||
{
|
||||
for (i=0; i<n; i++)
|
||||
if ( localbits[i] == 0 )
|
||||
localbits[i] = prevbits[i];
|
||||
/*if ( maxflag == 0 )
|
||||
{
|
||||
if ( komodo_pricecmp(nHeight,n,&maxflag,pricebits,localbits,PRICES_MAXCHANGE) < 0 )
|
||||
{
|
||||
fprintf(stderr,"maxflag.0 cmp error\n");
|
||||
return(-1);
|
||||
}
|
||||
}
|
||||
else*/
|
||||
{
|
||||
for (i=1; i<n; i++)
|
||||
{
|
||||
//maxflag = 0;
|
||||
//if ( (newprice= komodo_pricenew(&maxflag,pricebits[i],prevbits[i],PRICES_MAXCHANGE)) != 0 ) // proposed price is clamped
|
||||
if ( (maxflag= maxflags[i]) != 0 )
|
||||
{
|
||||
// make sure local price is moving in right direction
|
||||
@@ -1771,7 +1762,6 @@ int32_t komodo_opretvalidate(int32_t nHeight,CScript scriptPubKey)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return(0);
|
||||
} else fprintf(stderr,"wrong size %d vs %d, scriptPubKey size %d [%02x]\n",(int32_t)vopret.size(),(int32_t)Mineropret.size(),(int32_t)scriptPubKey.size(),scriptPubKey[0]);
|
||||
return(-1);
|
||||
|
||||
Reference in New Issue
Block a user