This commit is contained in:
jl777
2016-11-06 14:09:13 -03:00
parent ddb523264f
commit 68f2120ff6
2 changed files with 8 additions and 1 deletions

View File

@@ -193,7 +193,7 @@ int32_t komodo_check_deposit(int32_t height,const CBlock& block) // verify above
{
if ( (pax= komodo_paxfind(&space,txids[i-1],vouts[i-1])) != 0 && pax->fiatoshis == block.vtx[0].vout[i].nValue )
{
printf("i.%d match %.8f == %.8f\n",i,dstr(pax != 0 ? pax->fiatoshis:-1),dstr(block.vtx[0].vout[i].nValue));
//printf("i.%d match %.8f == %.8f\n",i,dstr(pax != 0 ? pax->fiatoshis:-1),dstr(block.vtx[0].vout[i].nValue));
komodo_paxmark(&space,txids[i-1],vouts[i-1],height);
}
else

View File

@@ -356,8 +356,15 @@ uint64_t komodo_paxprice(int32_t height,char *base,char *rel,uint64_t basevolume
numvotes = (int32_t)(sizeof(Peggy_inds)/sizeof(*Peggy_inds));
memset(votes,0,sizeof(votes));
for (i=0; i<numvotes; i++)
{
if ( (votes[i]= _komodo_paxprice(height-i,base,rel,COIN)) == 0 )
{
printf("null price height.%d\n",height-i);
return(0);
}
printf("%.8f ",dstr(votes[i]));
}
printf("numvotes.%d\n",numvotes);
start = (uint32_t)komodo_seed(height);
tolerance = 10000;
for (k=0; k<numvotes; k++)