Skip to content

Commit 9d1282b

Browse files
authored
Merge pull request #593 from histamineblkr/patch-1
Uncomplicate btcblock alias and fix 301 error
2 parents bea1766 + f95809a commit 9d1282b

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

03_1_Verifying_Your_Bitcoin_Setup.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,13 @@ You can do this by looking at a blocknet explorer, such as [the Blockcypher Test
4545

4646
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:
4747
```
48-
$ cat >> ~/.bash_profile << EOF
49-
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\\\`"
50-
EOF
48+
$ echo "alias btcblock='echo \$(bitcoin-cli -testnet getblockcount)/\$(curl -s https://blockstream.info/testnet/api/blocks/tip/height)'" >> .bash_profile
5149
$ source .bash_profile
5250
$ btcblock
5351
1804372/1804372
5452
```
5553

56-
> :link: **TESTNET vs MAINNET:** Remember that this tutorial generally assumes that you are using testnet. If you're using the mainnet instead, you can retrieve the current block height with: `wget -O - http://blockchain.info/q/getblockcount 2>/dev/null`. You can replace the latter half of the `btcblock` alias (after `/`) with that.
54+
> :link: **TESTNET vs MAINNET:** Remember that this tutorial generally assumes that you are using testnet. If you're using the mainnet instead, you can retrieve the current block height with: `curl -s https://blockchain.info/q/getblockcount`. You can replace the latter half of the `btcblock` alias (after `/\$(`) with that.
5755
5856
If you're not up-to-date, but your `getblockcount` is increasing, no problem. Total download time can take from an hour to several hours, depending on your setup.
5957

0 commit comments

Comments
 (0)