init commit of 24.0.1 custom signet image

This commit is contained in:
Richard Safier
2023-03-24 14:18:35 -04:00
parent 533595d645
commit f2b9f08fdc
37 changed files with 9789 additions and 2 deletions

19
mine.sh Executable file
View File

@@ -0,0 +1,19 @@
#!/bin/bash
NBITS=${NBITS:-"1e0377ae"} #minimum difficulty in signet
while true; do
ADDR=${MINETO:-$(bitcoin-cli getnewaddress)}
if [[ -f "${BITCOIN_DIR}/BLOCKPRODUCTIONDELAY.txt" ]]; then
BLOCKPRODUCTIONDELAY_OVERRIDE=$(cat ~/.bitcoin/BLOCKPRODUCTIONDELAY.txt)
echo "Delay OVERRIDE before next block" $BLOCKPRODUCTIONDELAY_OVERRIDE "seconds."
sleep $BLOCKPRODUCTIONDELAY_OVERRIDE
else
BLOCKPRODUCTIONDELAY=${BLOCKPRODUCTIONDELAY:="0"}
if [[ BLOCKPRODUCTIONDELAY -gt 0 ]]; then
echo "Delay before next block" $BLOCKPRODUCTIONDELAY "seconds."
sleep $BLOCKPRODUCTIONDELAY
fi
fi
echo "Mine To:" $ADDR
miner --cli="bitcoin-cli" generate --grind-cmd="bitcoin-util grind" --address=$ADDR --nbits=$NBITS --set-block-time=$(date +%s)
done