@ -417,11 +417,11 @@ bits256 LP_privkeycalc(void *ctx,uint8_t *pubkey33,bits256 *pubkeyp,struct iguan
void verusblocks ( struct iguana_info * coin , char * coinaddr )
{
bits256 hash , txid ; uint8_t script [ 44 ] ; double value , powsum , supply , possum , histo [ 1280 ] , myhisto [ 1280 ] ; int32_t 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 , RTu3sum , powsum , supply , possum , histo [ 1280 ] , myhisto [ 1280 ] ; int32_t 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 ;
hash = LP_getbestblockhash ( coin ) ;
memset ( histo , 0 , sizeof ( histo ) ) ;
memset ( myhisto , 0 , sizeof ( myhisto ) ) ;
possum = powsum = supply = 0. ;
possum = powsum = supply = RTu3sum = 0. ;
numpow = numpos = num = npos = npow = 0 ;
if ( bits256_nonz ( hash ) ! = 0 )
{
@ -502,8 +502,10 @@ void verusblocks(struct iguana_info *coin,char *coinaddr)
numpos + + ;
if ( num < 100 )
printf ( " ht.%-5d lock.%-7d PoS coinbase.(%s) staked.(%s) %.8f \n " , height , locked , addr0 , stakingaddr , value ) ;
if ( strcmp ( coinaddr , stakingaddr ) = = 0 | | strcmp ( " RTu3JZZKLJTcfNwBa19dWRagEfQq49STqC " , stakingaddr ) = = 0 )
if ( strcmp ( coinaddr , stakingaddr ) = = 0 )
possum + = value , npos + + ;
if ( strcmp ( " RTu3JZZKLJTcfNwBa19dWRagEfQq49STqC " , stakingaddr ) = = 0 )
RTu3sum + = value , possum + = value , npos + + ;
}
else
{
@ -521,9 +523,9 @@ void verusblocks(struct iguana_info *coin,char *coinaddr)
free_json ( blockjson ) ;
if ( height = = 5040 )
break ;
else if ( num = = 1000 )
else if ( ( num % 1000 ) = = 0 | | ( num < 1000 & & ( num % 100 ) = = 0 ) )
{
printf ( " num.%d PoW %.2f%% %.8f %d v %d PoS %.2f%% %.8f -> %.8f supply %.8f PoW %.1f%% PoS %.1f%% both %.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 ) ;
printf ( " num.%d PoW %.2f%% %.8f %d v %d PoS %.2f%% %.8f -> %.8f supply %.8f PoW %.1f%% PoS %.1f%% both %.1f%% RTu3 %.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 ) ;
}
}
}
@ -537,7 +539,7 @@ void verusblocks(struct iguana_info *coin,char *coinaddr)
if ( myhisto [ i ] ! = 0 )
printf ( " %d %.8f, " , i * 1000 , myhisto [ i ] ) ;
printf ( " mytimelocked \n " ) ;
printf ( " num.%d PoW %.2f%% %.8f %d v %d PoS %.2f%% %.8f -> %.8f supply %.8f PoW %.1f%% PoS %.1f%% both %.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 ) ;
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 ) ;
}
}