docs: fix RPC output examples for GET queries (#7799)

Remove JSON-RPC wrappers from GET output, since they are no longer printed.
Also format examples with jq so they look a little neater.

Fixes #7779.

Co-authored-by: William Banfield <4561443+williambanfield@users.noreply.github.com>
This commit is contained in:
M. J. Fromberger
2022-02-10 15:49:32 -08:00
committed by GitHub
co-authored by William Banfield
parent 7885839b75
commit ef1cc5b516
5 changed files with 86 additions and 95 deletions
+26 -26
View File
@@ -22,12 +22,12 @@ method via Websocket along with a valid query.
```json
{
"jsonrpc": "2.0",
"method": "subscribe",
"id": 0,
"params": {
"query": "tm.event='NewBlock'"
}
"jsonrpc": "2.0",
"method": "subscribe",
"id": 0,
"params": {
"query": "tm.event='NewBlock'"
}
}
```
@@ -50,26 +50,26 @@ Response:
```json
{
"jsonrpc": "2.0",
"id": 0,
"result": {
"query": "tm.event='ValidatorSetUpdates'",
"data": {
"type": "tendermint/event/ValidatorSetUpdates",
"value": {
"validator_updates": [
{
"address": "09EAD022FD25DE3A02E64B0FE9610B1417183EE4",
"pub_key": {
"type": "tendermint/PubKeyEd25519",
"value": "ww0z4WaZ0Xg+YI10w43wTWbBmM3dpVza4mmSQYsd0ck="
},
"voting_power": "10",
"proposer_priority": "0"
}
]
}
}
"jsonrpc": "2.0",
"id": 0,
"result": {
"query": "tm.event='ValidatorSetUpdates'",
"data": {
"type": "tendermint/event/ValidatorSetUpdates",
"value": {
"validator_updates": [
{
"address": "09EAD022FD25DE3A02E64B0FE9610B1417183EE4",
"pub_key": {
"type": "tendermint/PubKeyEd25519",
"value": "ww0z4WaZ0Xg+YI10w43wTWbBmM3dpVza4mmSQYsd0ck="
},
"voting_power": "10",
"proposer_priority": "0"
}
]
}
}
}
}
```
+2 -2
View File
@@ -47,8 +47,8 @@ definition](https://github.com/tendermint/tendermint/blob/master/types/genesis.g
- `chain_id`: ID of the blockchain. **This must be unique for
every blockchain.** If your testnet blockchains do not have unique
chain IDs, you will have a bad time. The ChainID must be less than 50 symbols.
- `initial_height`: Height at which Tendermint should begin at. If a blockchain is conducting a network upgrade,
starting from the stopped height brings uniqueness to previous heights.
- `initial_height`: Height at which Tendermint should begin. If a blockchain is conducting a network upgrade,
starting from the stopped height brings uniqueness to previous heights.
- `consensus_params` [spec](https://github.com/tendermint/spec/blob/master/spec/core/state.md#consensusparams)
- `block`
- `max_bytes`: Max block size, in bytes.