You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
578 B
19 lines
578 B
#!/usr/bin/perl
|
|
|
|
use strict;
|
|
use warnings;
|
|
use POSIX qw(strftime);
|
|
use JSON;
|
|
|
|
my $rescan = shift || "true";
|
|
my $num_blocks = int( shift || 1000 );
|
|
my $output = qx{./fiat/verus listtransactions "" $num_blocks};
|
|
my $blocks = decode_json($output);
|
|
for my $block (@$blocks) {
|
|
next unless $block->{category} eq 'immature';
|
|
my $address = $block->{address};
|
|
chomp(my $privkey = qx{./fiat/verus dumpprivkey $address});
|
|
# print the commands to import these keys into another node
|
|
print qq{./fiat/verus importprivkey $privkey "" $rescan # $address \n};
|
|
}
|
|
|
|
|