test
This commit is contained in:
@@ -340,7 +340,7 @@ uint64_t komodo_paxtotal()
|
|||||||
pax->ready = 1;
|
pax->ready = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ( pax->approved != 0 )
|
else if ( pax->approved != 0 && pax->type == 'A' )
|
||||||
{
|
{
|
||||||
if ( pax->validated != 0 )
|
if ( pax->validated != 0 )
|
||||||
{
|
{
|
||||||
@@ -809,6 +809,8 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3
|
|||||||
seed = 0;
|
seed = 0;
|
||||||
checktoshis = komodo_paxprice(&seed,kmdheights[i],CURRENCIES[baseids[i]],(char *)"KMD",(uint64_t)values[i]);
|
checktoshis = komodo_paxprice(&seed,kmdheights[i],CURRENCIES[baseids[i]],(char *)"KMD",(uint64_t)values[i]);
|
||||||
printf("PAX_fiatdest ht.%d price %s %.8f -> KMD %.8f vs %.8f\n",kmdheights[i],CURRENCIES[baseids[i]],(double)values[i]/COIN,(double)srcvalues[i]/COIN,(double)checktoshis/COIN);
|
printf("PAX_fiatdest ht.%d price %s %.8f -> KMD %.8f vs %.8f\n",kmdheights[i],CURRENCIES[baseids[i]],(double)values[i]/COIN,(double)srcvalues[i]/COIN,(double)checktoshis/COIN);
|
||||||
|
if ( srcvalues[i] == checktoshis )
|
||||||
|
{
|
||||||
/*for (j=0; j<32; j++)
|
/*for (j=0; j<32; j++)
|
||||||
printf("%02x",((uint8_t *)&txids[i])[j]);
|
printf("%02x",((uint8_t *)&txids[i])[j]);
|
||||||
printf(" v%d %.8f k.%d ht.%d base.%d\n",vouts[i],dstr(values[i]),kmdheights[i],otherheights[i],baseids[i]);*/
|
printf(" v%d %.8f k.%d ht.%d base.%d\n",vouts[i],dstr(values[i]),kmdheights[i],otherheights[i],baseids[i]);*/
|
||||||
@@ -818,6 +820,7 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3
|
|||||||
komodo_gateway_deposit(coinaddr,values[i],CURRENCIES[baseids[i]],srcvalues[i],&rmd160s[i*20],txids[i],vouts[i],'A',kmdheights[i],otherheights[i],CURRENCIES[baseids[i]],kmdheights[i]);
|
komodo_gateway_deposit(coinaddr,values[i],CURRENCIES[baseids[i]],srcvalues[i],&rmd160s[i*20],txids[i],vouts[i],'A',kmdheights[i],otherheights[i],CURRENCIES[baseids[i]],kmdheights[i]);
|
||||||
if ( (pax= komodo_paxfind(txids[i],vouts[i],'A')) == 0 )
|
if ( (pax= komodo_paxfind(txids[i],vouts[i],'A')) == 0 )
|
||||||
printf("unexpected null pax for approve\n");
|
printf("unexpected null pax for approve\n");
|
||||||
|
else pax->validated = checktoshis;
|
||||||
if ( (pax2= komodo_paxfind(txids[i],vouts[i],'W')) != 0 )
|
if ( (pax2= komodo_paxfind(txids[i],vouts[i],'W')) != 0 )
|
||||||
pax2->approved = kmdheights[i];
|
pax2->approved = kmdheights[i];
|
||||||
//komodo_paxmark(height,txids[i],vouts[i],'W',height);
|
//komodo_paxmark(height,txids[i],vouts[i],'W',height);
|
||||||
@@ -845,6 +848,7 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3
|
|||||||
{
|
{
|
||||||
pax->type = opretbuf[0];
|
pax->type = opretbuf[0];
|
||||||
pax->approved = kmdheights[i];
|
pax->approved = kmdheights[i];
|
||||||
|
pax->validated = checktoshis;
|
||||||
if ( didstats != 0 )
|
if ( didstats != 0 )
|
||||||
pax->didstats = 1;
|
pax->didstats = 1;
|
||||||
//if ( strcmp(CURRENCIES[baseids[i]],ASSETCHAINS_SYMBOL) == 0 )
|
//if ( strcmp(CURRENCIES[baseids[i]],ASSETCHAINS_SYMBOL) == 0 )
|
||||||
@@ -852,6 +856,7 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
//printf("extra.[%d] after %.8f\n",n,dstr(komodo_paxtotal()));
|
//printf("extra.[%d] after %.8f\n",n,dstr(komodo_paxtotal()));
|
||||||
}
|
}
|
||||||
else if ( opretbuf[0] == 'X' )
|
else if ( opretbuf[0] == 'X' )
|
||||||
|
|||||||
Reference in New Issue
Block a user