From cca9dc7d8f6a9c58b036e858a8d2c5b21115de6f Mon Sep 17 00:00:00 2001
From: Robert Martin-Legene <robert@nic.ar>
Date: Thu, 23 May 2019 19:16:27 -0300
Subject: [PATCH] Mas info de localstate

---
 bin/localstate.pl | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/bin/localstate.pl b/bin/localstate.pl
index fc90f4e..e6064f6 100755
--- a/bin/localstate.pl
+++ b/bin/localstate.pl
@@ -262,11 +262,15 @@ if ( $result )
         foreach my $account ( sort @$result )
         {
             my      $maymine    =   '';
-            $maymine            =   ' sealer'
+            $maymine            =   'sealer'
                 if exists $signers{$account};
             printf "Locally available account%s:\n", scalar @$result == 1 ? '' : 's'
                 if $i++ == 0;
-            printf "Account %d: %s%s\n", $i, $account, $maymine;
+            my      $txn        =   rpc( $libbfa, 'eth_getTransactionCount', qq("$account"), '"latest"' );
+            $txn                =~  s/^0x([a-fA-F\d]+)$/hex($1)/e;
+            my      $gold       =   rpc( $libbfa, 'eth_getBalance', qq("$account"), '"latest"' );
+            $gold               =~  s/^0x([a-fA-F\d]+)$/hex($1)/e;
+            printf "Account %d: %s %-6s %3d transaction%s, %d satoshi.\n", $i, $account, $maymine, $txn, ($txn==1?' ':'s'), $gold;
         }
     }
     else
-- 
GitLab