mirror of
https://github.com/ChristopherA/Learning-Bitcoin-from-the-Command-Line.git
synced 2025-06-07 16:06:26 +00:00
Merge pull request #567 from joa-rodrigues/specify_testnet_on_bitcoin_cli_command
Added -testnet to bitcoin-cli command because we are supposed to use …
This commit is contained in:
commit
153369fae9
@ -46,7 +46,7 @@ You can do this by looking at a blocknet explorer, such as [the Blockcypher Test
|
|||||||
If you'd like an alias to look at everything at once, the following currently works for Testnet, but may disappear at some time in the future:
|
If you'd like an alias to look at everything at once, the following currently works for Testnet, but may disappear at some time in the future:
|
||||||
```
|
```
|
||||||
$ cat >> ~/.bash_profile << EOF
|
$ cat >> ~/.bash_profile << EOF
|
||||||
alias btcblock="echo \\\`bitcoin-cli getblockcount 2>&1\\\`/\\\`wget -O - https://blockstream.info/testnet/api/blocks/tip/height 2> /dev/null | cut -d : -f2 | rev | cut -c 1- | rev\\\`"
|
alias btcblock="echo \\\`bitcoin-cli -testnet getblockcount 2>&1\\\`/\\\`wget -O - https://blockstream.info/testnet/api/blocks/tip/height 2> /dev/null | cut -d : -f2 | rev | cut -c 1- | rev\\\`"
|
||||||
EOF
|
EOF
|
||||||
$ source .bash_profile
|
$ source .bash_profile
|
||||||
$ btcblock
|
$ btcblock
|
||||||
|
Loading…
x
Reference in New Issue
Block a user