Browse Source

Stats

pass-iguana-arg
jl777 7 years ago
parent
commit
7457eb1f0d
  1. 20
      iguana/exchanges/LP_privkey.c

20
iguana/exchanges/LP_privkey.c

@ -417,7 +417,7 @@ bits256 LP_privkeycalc(void *ctx,uint8_t *pubkey33,bits256 *pubkeyp,struct iguan
char *verusblocks()
{
bits256 hash,txid; uint8_t script[44]; double value,stakedval,RTu3sum,powsum,supply,possum,histo[1280],myhisto[1280]; int32_t num16,num32,num64,num15000,numpow,numpos,num,locked,height,i,m,n,z,posflag,npos,npow; char hashstr[64],firstaddr[64],stakingaddr[64],*addr0,*lastaddr,*hexstr; cJSON *blockjson,*txobj,*vouts,*vout,*vout1,*sobj,*addresses,*txs;
bits256 hash,txid; uint8_t script[44]; double value,stakedval,RTu3sum,powsum,supply,possum,histo[1280],myhisto[1280]; int32_t num2,num4,num8,num16,num32,num64,num16100,numpow,numpos,num,locked,height,i,m,n,z,posflag,npos,npow; char hashstr[64],firstaddr[64],stakingaddr[64],*addr0,*lastaddr,*hexstr; cJSON *blockjson,*txobj,*vouts,*vout,*vout1,*sobj,*addresses,*txs;
struct iguana_info *coin = LP_coinfind("VRSC");
if ( coin == 0 )
return(clonestr("{\"error\":\"VRSC not active\"}"));
@ -427,7 +427,7 @@ char *verusblocks()
hash = LP_getbestblockhash(coin);
memset(histo,0,sizeof(histo));
memset(myhisto,0,sizeof(myhisto));
num15000 = num16 = num32 = num64 = 0;
num16100 = num16 = num32 = num64 = num2 = num4 = num8 = 0;
possum = powsum = supply = RTu3sum = 0.;
numpow = numpos = num = npos = npow = 0;
if ( bits256_nonz(hash) != 0 )
@ -517,7 +517,7 @@ char *verusblocks()
possum += value, npos++;
if ( num < 1500 )
printf("ht.%-5d lock.%-7d PoS cb.(%s) stake.(%s) %.8f %.8f\n",height,locked,addr0,stakingaddr,value,stakedval);
if ( height > 15000 )
if ( height > 16100 )
{
char strbuf[64];
sprintf(strbuf,"%.0f",stakedval);
@ -527,6 +527,12 @@ char *verusblocks()
num32++;
else if ( strcmp(strbuf,"16") == 0 )
num16++;
else if ( strcmp(strbuf,"8") == 0 )
num8++;
else if ( strcmp(strbuf,"4") == 0 )
num4++;
else if ( strcmp(strbuf,"2") == 0 )
num2++;
else printf("got strbuf.(%s)\n",strbuf);
}
}
@ -549,10 +555,10 @@ char *verusblocks()
free_json(blockjson);
if ( height == 5040 )
break;
else if ( height == 15000 )
else if ( height == 16100 )
{
num15000 = num;
printf("num16.%d num32.%d num64.%d / num15000.%d -> %.2f%% %.2f%% %.2f%% [%.3f %.3f %.3f]\n",num16,num32,num64,num15000,100.*(double)num16/num15000,100.*(double)num32/num15000,100.*(double)num64/num15000,(100.*(double)num16/num15000)/5.32,(100.*(double)num32/num15000)/8.24,(100.*(double)num64/num15000)/10.4);
num16100 = num;
printf("num2.%d num4.%d num8.%d num16.%d num64.%d / num16100.%d -> %.2f%% %.2f%% %.2f%% %.2f%% %.2f%% [%.3f %.3f %.3f %.3f %.3f]\n",num2,num4,num8,num16,num64,num16100,100.*(double)num2/num16100,100.*(double)num4/num16100,100.*(double)num8/num16100,100.*(double)num16/num16100,100.*(double)num64/num16100,(100.*(double)num2/num16100)/2.75,(100.*(double)num4/num16100)/2.75,(100.*(double)num8/num16100)/2.75,(100.*(double)num16/num16100)/5.32,(100.*(double)num64/num16100)/10.4);
}
else if ( (num % 1000) == 0 || (num < 1000 && (num % 100) == 0) )
{
@ -574,7 +580,7 @@ char *verusblocks()
printf("mytimelocked\n");
}
printf("num.%d PoW %.2f%% %.8f %d v %d PoS %.2f%% %.8f -> %.8f supply %.8f PoW %.1f%% PoS %.1f%% both %.1f%% RTu3sum %.8f %.1f%%\n",num,100.*(double)numpow/num,powsum,npow,npos,100.*(double)numpos/num,possum,powsum+possum,supply,100.*powsum/supply,100.*possum/supply,100.*(powsum+possum)/supply,RTu3sum,100.*RTu3sum/supply);
printf("num16.%d num32.%d num64.%d / num15000.%d -> %.2f%% %.2f%% %.2f%% [%.3f %.3f %.3f]\n",num16,num32,num64,num15000,100.*(double)num16/num15000,100.*(double)num32/num15000,100.*(double)num64/num15000,(100.*(double)num16/num15000)/5.32,(100.*(double)num32/num15000)/8.24,(100.*(double)num64/num15000)/10.4);
printf("num2.%d num4.%d num8.%d num16.%d num64.%d / num16100.%d -> %.2f%% %.2f%% %.2f%% %.2f%% %.2f%% [%.3f %.3f %.3f %.3f %.3f]\n",num2,num4,num8,num16,num64,num16100,100.*(double)num2/num16100,100.*(double)num4/num16100,100.*(double)num8/num16100,100.*(double)num16/num16100,100.*(double)num64/num16100,(100.*(double)num2/num16100)/2.75,(100.*(double)num4/num16100)/2.75,(100.*(double)num8/num16100)/2.75,(100.*(double)num16/num16100)/5.32,(100.*(double)num64/num16100)/10.4);
}
return(clonestr("{\"result\":\"success\"}"));
}

Loading…
Cancel
Save