From 1f0b53854054b635f1ebef9b060a59f4e21dbe64 Mon Sep 17 00:00:00 2001 From: Duke Date: Thu, 15 Jun 2023 15:43:08 -0400 Subject: [PATCH] Take into account ac_name to calculate total txs --- util/checkpoints.pl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/util/checkpoints.pl b/util/checkpoints.pl index 910f0abae..cb8301d61 100755 --- a/util/checkpoints.pl +++ b/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";