|
|
|
|
@@ -35,7 +35,7 @@ int32_t pax_fiatstatus(uint64_t *available,uint64_t *deposited,uint64_t *issued,
|
|
|
|
|
//printf("%p %s %.8f %.8f %.8f %.8f %.8f\n",sp,base,dstr(*deposited),dstr(*issued),dstr(*withdrawn),dstr(*approved),dstr(*redeemed));
|
|
|
|
|
return(0);
|
|
|
|
|
} else printf("pax_fiatstatus cant get basesp.%s\n",base);
|
|
|
|
|
} else printf("pax_fiatstatus illegal base.%s\n",base);
|
|
|
|
|
} // else printf("pax_fiatstatus illegal base.%s\n",base);
|
|
|
|
|
return(-1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -489,7 +489,7 @@ int32_t komodo_gateway_deposits(CMutableTransaction *txNew,char *base,int32_t to
|
|
|
|
|
if ( ASSETCHAINS_SYMBOL[0] != 0 && (pax_fiatstatus(&available,&deposited,&issued,&withdrawn,&approved,&redeemed,symbol) != 0 || available < pax->fiatoshis) )
|
|
|
|
|
{
|
|
|
|
|
if ( strcmp(ASSETCHAINS_SYMBOL,symbol) == 0 )
|
|
|
|
|
printf("miner.[%s]: skip %s %.8f when avail %.8f\n",ASSETCHAINS_SYMBOL,symbol,dstr(pax->fiatoshis),dstr(available));
|
|
|
|
|
printf("miner.[%s]: skip %s %.8f when avail %.8f deposited %.8f, issued %.8f withdrawn %.8f approved %.8f redeemed %.8f\n",ASSETCHAINS_SYMBOL,symbol,dstr(pax->fiatoshis),dstr(available),dstr(deposited),dstr(issued),dstr(withdrawn),dstr(approved),dstr(redeemed));
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
/*printf("pax.%s marked.%d %.8f -> %.8f ready.%d validated.%d\n",pax->symbol,pax->marked,dstr(pax->komodoshis),dstr(pax->fiatoshis),pax->ready!=0,pax->validated!=0);
|
|
|
|
|
@@ -542,7 +542,7 @@ int32_t komodo_gateway_deposits(CMutableTransaction *txNew,char *base,int32_t to
|
|
|
|
|
{
|
|
|
|
|
len += komodo_rwapproval(1,&data[len],pax);
|
|
|
|
|
PENDING_KOMODO_TX += pax->komodoshis;
|
|
|
|
|
printf(" len.%d vout.%u DEPOSIT %.8f <- pax.%s pending %.8f | ",len,pax->vout,(double)txNew->vout[numvouts].nValue/COIN,symbol,dstr(PENDING_KOMODO_TX));
|
|
|
|
|
printf(" len.%d vout.%u DEPOSIT %.8f <- pax.%s pending ht %d %d %.8f | ",len,pax->vout,(double)txNew->vout[numvouts].nValue/COIN,symbol,pax->height,pax->otherheight,dstr(PENDING_KOMODO_TX));
|
|
|
|
|
}
|
|
|
|
|
if ( numvouts++ >= 64 )
|
|
|
|
|
break;
|
|
|
|
|
@@ -618,9 +618,9 @@ int32_t komodo_check_deposit(int32_t height,const CBlock& block) // verify above
|
|
|
|
|
if ( (pax= komodo_paxfinds(txids[i-1],vouts[i-1])) != 0 ) // finds... make sure right one
|
|
|
|
|
{
|
|
|
|
|
pax->type = opcode;
|
|
|
|
|
if ( opcode == 'I' && pax_fiatstatus(&available,&deposited,&issued,&withdrawn,&approved,&redeemed,symbol) != 0 || available < pax->fiatoshis )
|
|
|
|
|
if ( opcode == 'I' && (pax_fiatstatus(&available,&deposited,&issued,&withdrawn,&approved,&redeemed,symbol) != 0 || available < pax->fiatoshis) )
|
|
|
|
|
{
|
|
|
|
|
printf("checkdeposit: skip %s %.8f when avail %.8f\n",pax->symbol,dstr(pax->fiatoshis),dstr(available));
|
|
|
|
|
printf("checkdeposit.[%s]: skip %s %.8f when avail %.8f deposited %.8f, issued %.8f withdrawn %.8f approved %.8f redeemed %.8f\n",ASSETCHAINS_SYMBOL,symbol,dstr(pax->fiatoshis),dstr(available),dstr(deposited),dstr(issued),dstr(withdrawn),dstr(approved),dstr(redeemed));
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
if ( ((opcode == 'I' && (pax->fiatoshis == 0 || pax->fiatoshis == block.vtx[0].vout[i].nValue)) || (opcode == 'X' && (pax->komodoshis == 0 || pax->komodoshis == block.vtx[0].vout[i].nValue))) )
|
|
|
|
|
|