a tool to observe btc blokcchain
Du kannst nicht mehr als 25 Themen auswählen
Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
|
|
#!/bin/bash
|
|
|
DATADIR=/opt/TOPISTO/data/btcspy/data
|
|
|
|
|
|
if [[ $# -eq 1 ]]; then
|
|
|
DATADIR=$1
|
|
|
fi
|
|
|
|
|
|
if [ -d $DATADIR ];
|
|
|
then
|
|
|
find $DATADIR/simpledb/blocks -type f -mtime +3 -exec rm {} \;
|
|
|
find $DATADIR/json -type f -mtime +3 -exec rm {} \;
|
|
|
|
|
|
|
|
|
for BLOCK in `ls $DATADIR/simpledb/blocks`
|
|
|
do
|
|
|
if [ ! -f $DATADIR/json/$BLOCK.json ];
|
|
|
then
|
|
|
/tmp/btcspy/bin/block2json $DATADIR/simpledb/blocks/$BLOCK > $DATADIR/json/$BLOCK.json
|
|
|
fi
|
|
|
done
|
|
|
fi
|