Browse Source

Take into account ac_name to calculate total txs

pull/305/head
Duke 12 months ago
parent
commit
1f0b538540
  1. 6
      util/checkpoints.pl

6
util/checkpoints.pl

@ -33,6 +33,8 @@ if ($acname) {
$cli .= " -ac_name=$acname";
# TODO: assumes all HSC's will have a blocktime of 60s
$perday = 1440;
} else {
$acname = 'HUSH3';
}
my $gethash = "$cli getblockhash";
@ -64,8 +66,8 @@ while (1) {
my $time = qx{$cli getblock $last |grep time|cut -d: -f2| sed 's/,//g'};
chomp($time);
# TODO: This is Linux-only and assumes new (not legacy) dir
my $line1 = qx{grep --text height=$prev ~/.hush/HUSH3/debug.log};
my $line2 = qx{grep --text height=$blocks ~/.hush/HUSH3/debug.log};
my $line1 = qx{grep --text height=$prev ~/.hush/$acname/debug.log};
my $line2 = qx{grep --text height=$blocks ~/.hush/$acname/debug.log};
my $txs_per_day = 2 * $perday; # default estimate is 2 txs per block, on average
my $total_txs = 0;
#print "line1: $line1\n";

Loading…
Cancel
Save