mirror of
https://github.com/lnbook/lnbook
synced 2024-11-01 03:20:53 +00:00
7c5d5699bf
Build network, create keys/addresses, fund wallets.
17 lines
662 B
Bash
Executable File
17 lines
662 B
Bash
Executable File
#!/bin/bash
|
|
|
|
export address=`cat /bitcoind/keys/demo_address.txt`
|
|
export privkey=`cat /bitcoind/keys/demo_privkey.txt`
|
|
echo "================================================"
|
|
echo "Bitcoin address: " ${address}
|
|
echo "Private key: " ${privkey}
|
|
echo "Balance:" `bitcoin-cli -datadir=/bitcoind getbalance`
|
|
echo "================================================"
|
|
echo "Mining 101 blocks to unlock some bitcoin"
|
|
bitcoin-cli -datadir=/bitcoind generatetoaddress 101 $address
|
|
echo "Mining 1 block every 10 seconds"
|
|
while sleep 10; do \
|
|
bitcoin-cli -datadir=/bitcoind generatetoaddress 1 $address; \
|
|
echo "Balance:" `bitcoin-cli -datadir=/bitcoind getbalance`; \
|
|
done
|