More error detection
This commit is contained in:
@@ -9,6 +9,11 @@ my $block = shift || die "Usage: $0 123";
|
|||||||
my $hush = "./src/hush-cli";
|
my $hush = "./src/hush-cli";
|
||||||
my $blockcount = qx{$hush getblockcount};
|
my $blockcount = qx{$hush getblockcount};
|
||||||
|
|
||||||
|
unless ($blockcount = int($blockcount)) {
|
||||||
|
print "Invalid response from hush-cli\n";
|
||||||
|
exit 1;
|
||||||
|
}
|
||||||
|
|
||||||
if ($block <= $blockcount) {
|
if ($block <= $blockcount) {
|
||||||
die "That block has already happened!";
|
die "That block has already happened!";
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user