diff --git a/var/www/explorer.dragonx.is/bin/update_blocks_redis.pl b/var/www/explorer.dragonx.is/bin/update_blocks_redis.pl index 210a386..42c0ab6 100644 --- a/var/www/explorer.dragonx.is/bin/update_blocks_redis.pl +++ b/var/www/explorer.dragonx.is/bin/update_blocks_redis.pl @@ -54,7 +54,7 @@ for my $h ($height-80 .. $height) { my @txs = @{ $block->{tx} }; my $numtx = @txs; # TODO: look on filesystem first? redis cache? - my $hash = qx!$cli getblockhash $h!; + my $hash = qx!$cli -ac_name=$acname getblockhash $h!; chomp $hash; my $blockdir = "$root/var/www/$domain/block/$hash"; @@ -100,7 +100,7 @@ HTML my $txi = 0; for my $tx (@txs) { - my $json = qx!$cli getrawtransaction $tx 1!; + my $json = qx!$cli -ac_name=$acname getrawtransaction $tx 1!; # "vout": 0, # "address": "RBHHGTQoULWb8gPD6Nj4fix6ov46hzzQMj", # address is duplicated in the JSON of getrawtransaction !! fuck. @@ -320,7 +320,7 @@ HTML sub get_raw { my $tx = shift; - my $cmd = "$cli getrawtransaction $tx 1"; + my $cmd = "$cli -ac_name=$acname getrawtransaction $tx 1"; warn $cmd; my $json = qx!$cmd!; # "vout": 0, @@ -383,7 +383,7 @@ sub get_block { # create data if it's not there if( $block =~ m/^HASH/ || length($block) == 0 ) { - my $cmd = "$cli getblock $height"; + my $cmd = "$cli -ac_name=$acname getblock $height"; warn $cmd; $block = qx/$cmd/; } diff --git a/var/www/explorer.dragonx.is/update_api.sh b/var/www/explorer.dragonx.is/update_api.sh index 133c4f3..ce54872 100644 --- a/var/www/explorer.dragonx.is/update_api.sh +++ b/var/www/explorer.dragonx.is/update_api.sh @@ -9,11 +9,11 @@ DIR=/var/www/$DOMAIN/var/www/$DOMAIN/api # TODO: remove IP info from getpeerinfo #$CLI getpeerinfo > $DIR/getpeerinfo.json -$CLI getinfo &> $DIR/getinfo.json -$CLI getmininginfo &> $DIR/getmininginfo.json -$CLI getblockchaininfo &> $DIR/getblockchain.json -$CLI getchaintxstats &> $DIR/getchaintxstats.json -$CLI gettxoutsetinfo &> $DIR/gettxoutsetinfo.json -$CLI coinsupply &> $DIR/coinsupply.json -$CLI getchaintips &> $DIR/getchaintips.json -$CLI getchaintxstats &> $DIR/getchaintxstats.json +$CLI -ac_name=$ACNAME getinfo &> $DIR/getinfo.json +$CLI -ac_name=$ACNAME getmininginfo &> $DIR/getmininginfo.json +$CLI -ac_name=$ACNAME getblockchaininfo &> $DIR/getblockchain.json +$CLI -ac_name=$ACNAME getchaintxstats &> $DIR/getchaintxstats.json +$CLI -ac_name=$ACNAME gettxoutsetinfo &> $DIR/gettxoutsetinfo.json +$CLI -ac_name=$ACNAME coinsupply &> $DIR/coinsupply.json +$CLI -ac_name=$ACNAME getchaintips &> $DIR/getchaintips.json +$CLI -ac_name=$ACNAME getchaintxstats &> $DIR/getchaintxstats.json