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.
 
 
 
 

24 lines
949 B

#!/usr/bin/env bash
# Copyright 2016-2022 The Hush Developers
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 $HIGHESTBLOCK
# 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
redis-cli set anonset $($CLI z_anonsetblockdelta 1 $HIGHESTBLOCK)
redis-cli set hashps $($CLI getnetworkhashps -1)