diff --git a/README.md b/README.md index fee2315..a58a450 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,15 @@ # ShieldedOutputs -Counts shielded outputs in hush v3 blocks +Counts shielded outputs in Hush v3 blocks -Forked from [ChileBob](https://github.com/ChileBob/ShieldedOutputs) who works on ycash +Originally forked from [ChileBob](https://github.com/ChileBob/ShieldedOutputs) who works on ycash ## How to use -1. Make sure your hush daemon (hushd) is running. -1. Open getstats in a text editor. -1. change "my $block_height = 699000" to what block number you want to begin at. -1. Run this with `perl getstats` and watch how many shielded outputs occured in each block in sequence. +1. Make sure your Hush daemon (hushd) is running. +1. Run this with `perl getstats` and watch how many shielded outputs occured in each block in sequence as of the default block variable 699000 in code. +1. If you want to specify a certain block, for example startin at block 700,000 then run `perl getstats --block 700000` and watch it go! ## License GPLv3 - diff --git a/getstats b/getstats index 41c6aa9..68d6832 100644 --- a/getstats +++ b/getstats @@ -5,18 +5,28 @@ # forked from https://github.com/ChileBob/ShieldedOutputs # Copyright (c) 2021 ChileBob under MIT License # - package common; -use Data::Dumper; -use JSON; use strict; use warnings; +use Data::Dumper; +use JSON; +#use Getopt::Long; +use Getopt::Long; my $node_client = 'hush-cli'; # hush-cli client +my $block_height = 699000; # start block unless changed with --block +my $version = "0.1"; +my $print_version; + +# Command line options +GetOptions ("block=i" => \$block_height, + "version" => \$print_version); -#my $block_height = 570000; # start block -my $block_height = 699000; # changed start block +if($print_version) { + print "ShieldedOutputs - Hush Remix Version $version\n"; + exit(); +} my $blockchaininfo = node_cli('getblockchaininfo');