Update 17_1_Accessing_Bitcoind_with_Go.md

This commit is contained in:
Shannon Appelcline 2020-09-01 12:58:04 -10:00 committed by GitHub
parent cf5380eab1
commit a3f6e4041d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -148,7 +148,10 @@ All that's required now is to make an informational call like `GetBlockCount` or
fmt.Printf("%d\n", blockCount)
fmt.Printf("%s\n", blockHash.String())
```
The `rpcclient` functions can take inputs as well, for example ```client.GetBlockHash(blockCount)``` takes the block count as an input. The ```client.GetBlockHash(blockCount)``` from above would look like this as a ```bitcoin-cli``` command:
### Making an RPC Call with Arguments
The `rpcclient` functions can take inputs as well; for example ```client.GetBlockHash(blockCount)``` takes the block count as an input. The ```client.GetBlockHash(blockCount)``` from above would look like this as a ```bitcoin-cli``` command:
```
$ bitcoin-cli getblockhash 1830868
00000000000002d53b6b9bba4d4e7dc44a79cebd1024d1bcfb9b3cc07d6cad9c