2048
This commit is contained in:
@@ -1629,10 +1629,10 @@ int32_t komodo_pricecmp(int32_t nHeight,int32_t n,char *maxflags,uint32_t *price
|
||||
// komodo_priceclamp() clamps any price that is beyond tolerance
|
||||
int32_t komodo_priceclamp(int32_t n,uint32_t *pricebits,uint32_t *refprices,int64_t tolerance)
|
||||
{
|
||||
int32_t i,maxflag; uint32_t newprice;
|
||||
int32_t i; uint32_t newprice; char maxflags[2048];
|
||||
memset(maxflags,0,sizeof(maxflags));
|
||||
for (i=1; i<n; i++)
|
||||
{
|
||||
maxflag = 0;
|
||||
if ( (newprice= komodo_pricenew(&maxflag,pricebits[i],refprices[i],tolerance)) != 0 )
|
||||
{
|
||||
fprintf(stderr,"priceclamped[%d of %d] %u vs %u -> %u\n",i,n,refprices[i],pricebits[i],newprice);
|
||||
@@ -1645,7 +1645,7 @@ int32_t komodo_priceclamp(int32_t n,uint32_t *pricebits,uint32_t *refprices,int6
|
||||
// komodo_mineropret() returns a valid pricedata to add to the coinbase opreturn for nHeight
|
||||
CScript komodo_mineropret(int32_t nHeight)
|
||||
{
|
||||
CScript opret; char maxflags[8192]; uint32_t pricebits[8192],prevbits[8192]; int32_t maxflag,i,n,numzero=0;
|
||||
CScript opret; char maxflags[2048]; uint32_t pricebits[2048],prevbits[2048]; int32_t maxflag,i,n,numzero=0;
|
||||
if ( Mineropret.size() >= PRICES_SIZEBIT0 )
|
||||
{
|
||||
n = (int32_t)(Mineropret.size() / sizeof(uint32_t));
|
||||
@@ -1695,7 +1695,7 @@ CScript komodo_mineropret(int32_t nHeight)
|
||||
|
||||
int32_t komodo_opretvalidate(int32_t nHeight,CScript scriptPubKey)
|
||||
{
|
||||
std::vector<uint8_t> vopret; char maxflags[8192]; double btcusd,btcgbp,btceur; uint32_t localbits[8192],pricebits[8192],prevbits[8192],newprice; int32_t i,maxflag,lag,lag2,n; uint32_t now = (uint32_t)time(NULL);
|
||||
std::vector<uint8_t> vopret; char maxflags[2048]; double btcusd,btcgbp,btceur; uint32_t localbits[2048],pricebits[2048],prevbits[2048],newprice; int32_t i,maxflag,lag,lag2,n; uint32_t now = (uint32_t)time(NULL);
|
||||
if ( ASSETCHAINS_CBOPRET != 0 && nHeight > 0 )
|
||||
{
|
||||
GetOpReturnData(scriptPubKey,vopret);
|
||||
|
||||
Reference in New Issue
Block a user