Skip to content

Commit 30bc0f6

Browse files
committed
Merge #10710: REST/RPC example update
b8bb425 REST/RPC example update (Michael Rotarius) Tree-SHA512: 3a7003f5996f58d9881e7b7a9155f8b1c233faea2977cd02c481567b60fa47105433184da3d887ef3ec28775ad33719b779bff2753d64b775b29d8a7a6214fda
2 parents be82498 + b8bb425 commit 30bc0f6

File tree

2 files changed

+18
-15
lines changed

2 files changed

+18
-15
lines changed

doc/REST-interface.md

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,13 @@ Only supports JSON as output format.
4040
* headers : (numeric) the current number of headers we have validated
4141
* bestblockhash : (string) the hash of the currently best block
4242
* difficulty : (numeric) the current difficulty
43+
* mediantime : (numeric) the median time of the 11 blocks before the most recent block on the blockchain
4344
* verificationprogress : (numeric) estimate of verification progress [0..1]
4445
* chainwork : (string) total amount of work in active chain, in hexadecimal
4546
* pruned : (boolean) if the blocks are subject to pruning
4647
* pruneheight : (numeric) heighest block available
4748
* softforks : (array) status of softforks in progress
49+
* bip9_softforks : (object) status of BIP9 softforks in progress
4850

4951
####Query UTXO set
5052
`GET /rest/getutxos/<checkmempool>/<txid>-<n>/<txid>-<n>/.../<txid>-<n>.<bin|hex|json>`
@@ -57,25 +59,25 @@ Example:
5759
```
5860
$ curl localhost:18332/rest/getutxos/checkmempool/b2cdfd7b89def827ff8af7cd9bff7627ff72e5e8b0f71210f92ea7a4000c5d75-0.json 2>/dev/null | json_pp
5961
{
60-
"chaintipHash" : "00000000fb01a7f3745a717f8caebee056c484e6e0bfe4a9591c235bb70506fb",
6162
"chainHeight" : 325347,
63+
"chaintipHash" : "00000000fb01a7f3745a717f8caebee056c484e6e0bfe4a9591c235bb70506fb",
64+
"bitmap": "1",
6265
"utxos" : [
6366
{
67+
"txvers" : 1
68+
"height" : 2147483647,
69+
"value" : 8.8687,
6470
"scriptPubKey" : {
65-
"addresses" : [
66-
"mi7as51dvLJsizWnTMurtRmrP8hG2m1XvD"
67-
],
68-
"type" : "pubkeyhash",
71+
"asm" : "OP_DUP OP_HASH160 1c7cebb529b86a04c683dfa87be49de35bcf589e OP_EQUALVERIFY OP_CHECKSIG",
6972
"hex" : "76a9141c7cebb529b86a04c683dfa87be49de35bcf589e88ac",
7073
"reqSigs" : 1,
71-
"asm" : "OP_DUP OP_HASH160 1c7cebb529b86a04c683dfa87be49de35bcf589e OP_EQUALVERIFY OP_CHECKSIG"
72-
},
73-
"value" : 8.8687,
74-
"height" : 2147483647,
75-
"txvers" : 1
74+
"type" : "pubkeyhash",
75+
"addresses" : [
76+
"mi7as51dvLJsizWnTMurtRmrP8hG2m1XvD"
77+
]
78+
}
7679
}
77-
],
78-
"bitmap" : "1"
80+
]
7981
}
8082
```
8183

@@ -87,6 +89,8 @@ Only supports JSON as output format.
8789
* size : (numeric) the number of transactions in the TX mempool
8890
* bytes : (numeric) size of the TX mempool in bytes
8991
* usage : (numeric) total TX mempool memory usage
92+
* maxmempool : (numeric) maximum memory usage for the mempool in bytes
93+
* mempoolminfee : (numeric) minimum feerate (BTC per KB) for tx to be accepted
9094

9195
`GET /rest/mempool/contents.json`
9296

src/rpc/net.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -301,9 +301,8 @@ UniValue getaddednodeinfo(const JSONRPCRequest& request)
301301
" ,...\n"
302302
"]\n"
303303
"\nExamples:\n"
304-
+ HelpExampleCli("getaddednodeinfo", "true")
305-
+ HelpExampleCli("getaddednodeinfo", "true \"192.168.0.201\"")
306-
+ HelpExampleRpc("getaddednodeinfo", "true, \"192.168.0.201\"")
304+
+ HelpExampleCli("getaddednodeinfo", "\"192.168.0.201\"")
305+
+ HelpExampleRpc("getaddednodeinfo", "\"192.168.0.201\"")
307306
);
308307

309308
if(!g_connman)

0 commit comments

Comments
 (0)