Browse Source

added -ac_name where needed

pull/1/head
dan_s 2 years ago
parent
commit
6482917a4e
  1. 8
      var/www/explorer.dragonx.is/bin/update_blocks_redis.pl
  2. 16
      var/www/explorer.dragonx.is/update_api.sh

8
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/;
}

16
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

Loading…
Cancel
Save