This commit is contained in:
jl777
2016-11-06 16:34:26 -03:00
parent 638d7b2bb1
commit b4ac3c4120

View File

@@ -368,7 +368,7 @@ uint64_t komodo_paxprice(int32_t height,char *base,char *rel,uint64_t basevolume
memset(votes,0,sizeof(votes)); memset(votes,0,sizeof(votes));
for (sum=i=zeroes=nonz=0; i<numvotes; i++) for (sum=i=zeroes=nonz=0; i<numvotes; i++)
{ {
if ( (votes[numvotes-1-i]= _komodo_paxprice(height-i,base,rel,COIN)) == 0 ) if ( (votes[numvotes-1-i]= _komodo_paxprice(height-i,base,rel,10000)) == 0 )
{ {
zeroes++; zeroes++;
//printf("null price height.%d\n",height-i); //printf("null price height.%d\n",height-i);
@@ -421,7 +421,7 @@ uint64_t komodo_paxprice(int32_t height,char *base,char *rel,uint64_t basevolume
sum += (den * votes[(ind + j) % numvotes]); sum += (den * votes[(ind + j) % numvotes]);
} }
sum /= densum; sum /= densum;
sum = (sum * basevolume) / COIN; sum = (sum / 10000) * basevolume;
printf("seed.%llx sum %.8f densum %.8f basevol %.8f\n",(long long)seed,dstr(sum),dstr(densum),dstr(basevolume)); printf("seed.%llx sum %.8f densum %.8f basevol %.8f\n",(long long)seed,dstr(sum),dstr(densum),dstr(basevolume));
break; break;
} }