Skip to content

Commit d73d4cc

Browse files
author
Prayank
committed
Add -getinfo
1 parent a398b0c commit d73d4cc

File tree

1 file changed

+32
-1
lines changed

1 file changed

+32
-1
lines changed

03_2_Knowing_Your_Bitcoin_Setup.md

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,14 +196,45 @@ Result:
196196
}
197197
198198
Examples:
199-
> bitcoin-cli getmininginfo
199+
> bitcoin-cli getmininginfo
200200
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getmininginfo", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
201201
```
202202
> :book: ***What is RPC?*** `bitcoin-cli` is just a handy interface that lets you send commands to the `bitcoind`. More specifically, it's an interface that lets you send RPC (or Remote Procedure Protocol) commands to the `bitcoind`. Often, the `bitcoin-cli` command and the RPC command have identical names and interfaces, but some `bitcoin-cli` commands instead provide shortcuts for more complex RPC requests. Generally, the `bitcoin-cli` interface is much cleaner and simpler than trying to send RPC commands by hand, using `curl` or some other method. However, it also has limitations as to what you can ultimately do.
203203
204204
## Optional: Know Your Bitcoin Info
205205

206206
A variety of bitcoin-cli commands can give you additional information on your bitcoin data. The most general ones are:
207+
208+
`bitcoin-cli -getinfo` returns information from different RPCs (user-friendly)
209+
210+
```diff
211+
$ bitcoin-cli -getinfo
212+
213+
! Chain: test
214+
Blocks: 1977694
215+
Headers: 1977694
216+
Verification progress: 0.9999993275374796
217+
Difficulty: 1
218+
219+
+ Network: in 0, out 8, total 8
220+
Version: 219900
221+
Time offset (s): 0
222+
Proxy: N/A
223+
Min tx relay fee rate (BTC/kvB): 0.00001000
224+
225+
@@ Wallet: ""@@
226+
Keypool size: 1000
227+
Unlocked until: 0
228+
Transaction fee rate (-paytxfee) (BTC/kvB): 0.00000000
229+
230+
# Balance: 0.02853102
231+
232+
- Warnings: unknown new rules activated (versionbit 28)
233+
234+
```
235+
236+
Other commands to get information about blockchain, mining, network, wallet etc.
237+
207238
```
208239
$ bitcoin-cli getblockchaininfo
209240
$ bitcoin-cli getmininginfo

0 commit comments

Comments
 (0)