From f7a9db724a6180594921c03d5764f0dd385753f9 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Sat, 13 Jun 2020 09:24:58 -0400 Subject: [PATCH] More error detection --- contrib/block_time.pl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/contrib/block_time.pl b/contrib/block_time.pl index dff43ea4e..b4b039a60 100755 --- a/contrib/block_time.pl +++ b/contrib/block_time.pl @@ -9,6 +9,11 @@ my $block = shift || die "Usage: $0 123"; my $hush = "./src/hush-cli"; my $blockcount = qx{$hush getblockcount}; +unless ($blockcount = int($blockcount)) { + print "Invalid response from hush-cli\n"; + exit 1; +} + if ($block <= $blockcount) { die "That block has already happened!"; } else {