Skip to content
Permalink
Browse files

added view blocks count

  • Loading branch information...
deemru committed Aug 5, 2019
1 parent c80e0b1 commit 7376c3652aee95886679ddbab77e76e6e455bd68
Showing with 5 additions and 0 deletions.
  1. +5 −0 index.php
@@ -857,13 +857,17 @@ function w8io_a( $address )
$percent = ( $percent > 0 && $percent < 100 ) ? $percent : 100;
// waves_fees
$waves_blocks = 0;
$waves_fees = 0;
$query = $api->get_transactions_query( "SELECT * FROM transactions WHERE block >= $from AND block <= $to AND b = $aid AND type = 0" );
foreach( $query as $wtx )
{
$wtx = w8io_filter_wtx( $wtx );
if( $wtx['asset'] === 0 )
{
$waves_fees += $wtx['amount'];
$waves_blocks++;
}
}
$waves_fees = intval( $waves_fees * $percent / 100 );
@@ -885,6 +889,7 @@ function w8io_a( $address )
$mrt_fees = intval( $mrt_fees * $percent / 100 );
echo "pay ($from .. $to) ($percent %):" . PHP_EOL . PHP_EOL;
echo w8io_amount( $waves_blocks, 0 ) . ' Blocks' . PHP_EOL;
echo w8io_amount( $waves_fees, 8 ) . " Waves" . PHP_EOL;
echo w8io_amount( $mrt_fees, 2 ) . " MinersReward" . PHP_EOL;

0 comments on commit 7376c36

Please sign in to comment.
You can’t perform that action at this time.