forked from onryo/siona
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.
35 lines
1.0 KiB
35 lines
1.0 KiB
#!/usr/bin/env bash
|
|
# Copyright 2016-2022 The Hush Developers
|
|
|
|
set -e
|
|
|
|
SIONA_ROOT_DIR="siona-DragonX"
|
|
SIONA_DOMAIN="explorer.dragonx.is"
|
|
SIONA_CLI="/home/admin/HUSH/hush3/src/dragonx-cli"
|
|
SIONA_ACNAME="DRAGONX"
|
|
|
|
DOMAIN=${SIONA_DOMAIN}
|
|
ROOT_DIR=${SIONA_ROOT_DIR}
|
|
CLI=${SIONA_CLI}
|
|
# this is optional and not used yet here
|
|
ACNAME=${SIONA_ACNAME}
|
|
DIR=/var/www/$ROOT_DIR/$DOMAIN/api
|
|
HIGHESTBLOCK=$(curl -s "https://$DOMAIN/api/getblockchain.json" | jq -r '.blocks')
|
|
echo "highest block" $HIGHESTBLOCK
|
|
|
|
|
|
# TODO: remove IP info from getpeerinfo
|
|
#$CLI getpeerinfo > $DIR/getpeerinfo.json
|
|
$CLI getinfo &> $DIR/getinfo.json
|
|
$CLI getmininginfo &> $DIR/getmininginfo.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
|
|
|
|
|
|
redis-cli set anonset $($CLI z_anonsetblockdelta 1 $HIGHESTBLOCK)
|
|
redis-cli set hashps $($CLI getnetworkhashps -1)
|
|
|
|
|