mirror of
https://github.com/aljazceru/cyphernode.git
synced 2026-01-03 04:55:46 +01:00
15 lines
494 B
Bash
Executable File
15 lines
494 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# Mine
|
|
mine() {
|
|
local nbblocks=${1:-1}
|
|
local minedaddr
|
|
|
|
echo ; echo "About to mine ${nbblocks} block(s)..."
|
|
minedaddr=$(docker exec -it $(docker ps -q -f "name=cyphernode_bitcoin") bitcoin-cli -rpcwallet=spending01.dat getnewaddress | tr -d '\r')
|
|
echo ; echo "minedaddr=${minedaddr}"
|
|
docker exec -it $(docker ps -q -f "name=cyphernode_bitcoin") bitcoin-cli -rpcwallet=spending01.dat generatetoaddress ${nbblocks} "${minedaddr}"
|
|
}
|
|
|
|
case "${0}" in *mine.sh) mine $@;; esac
|