|
@ -54,7 +54,7 @@ for my $h ($height-80 .. $height) { |
|
|
my @txs = @{ $block->{tx} }; |
|
|
my @txs = @{ $block->{tx} }; |
|
|
my $numtx = @txs; |
|
|
my $numtx = @txs; |
|
|
# TODO: look on filesystem first? redis cache? |
|
|
# TODO: look on filesystem first? redis cache? |
|
|
my $hash = qx!$cli getblockhash $h!; |
|
|
my $hash = qx!$cli -ac_name=$acname getblockhash $h!; |
|
|
chomp $hash; |
|
|
chomp $hash; |
|
|
|
|
|
|
|
|
my $blockdir = "$root/var/www/$domain/block/$hash"; |
|
|
my $blockdir = "$root/var/www/$domain/block/$hash"; |
|
@ -100,7 +100,7 @@ HTML |
|
|
|
|
|
|
|
|
my $txi = 0; |
|
|
my $txi = 0; |
|
|
for my $tx (@txs) { |
|
|
for my $tx (@txs) { |
|
|
my $json = qx!$cli getrawtransaction $tx 1!; |
|
|
my $json = qx!$cli -ac_name=$acname getrawtransaction $tx 1!; |
|
|
# "vout": 0, |
|
|
# "vout": 0, |
|
|
# "address": "RBHHGTQoULWb8gPD6Nj4fix6ov46hzzQMj", |
|
|
# "address": "RBHHGTQoULWb8gPD6Nj4fix6ov46hzzQMj", |
|
|
# address is duplicated in the JSON of getrawtransaction !! fuck. |
|
|
# address is duplicated in the JSON of getrawtransaction !! fuck. |
|
@ -320,7 +320,7 @@ HTML |
|
|
|
|
|
|
|
|
sub get_raw { |
|
|
sub get_raw { |
|
|
my $tx = shift; |
|
|
my $tx = shift; |
|
|
my $cmd = "$cli getrawtransaction $tx 1"; |
|
|
my $cmd = "$cli -ac_name=$acname getrawtransaction $tx 1"; |
|
|
warn $cmd; |
|
|
warn $cmd; |
|
|
my $json = qx!$cmd!; |
|
|
my $json = qx!$cmd!; |
|
|
# "vout": 0, |
|
|
# "vout": 0, |
|
@ -383,7 +383,7 @@ sub get_block { |
|
|
|
|
|
|
|
|
# create data if it's not there |
|
|
# create data if it's not there |
|
|
if( $block =~ m/^HASH/ || length($block) == 0 ) { |
|
|
if( $block =~ m/^HASH/ || length($block) == 0 ) { |
|
|
my $cmd = "$cli getblock $height"; |
|
|
my $cmd = "$cli -ac_name=$acname getblock $height"; |
|
|
warn $cmd; |
|
|
warn $cmd; |
|
|
$block = qx/$cmd/; |
|
|
$block = qx/$cmd/; |
|
|
} |
|
|
} |
|
|