mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-20 15:04:22 +00:00
rpc: /block_results fix docs + write test + restructure response (#3615)
BREAKING
Example response:
```json
{
"jsonrpc": "2.0",
"id": "",
"result": {
"height": "2109",
"txs_results": null,
"begin_block_events": null,
"end_block_events": null,
"validator_updates": null,
"consensus_param_updates": null
}
}
```
Old result consisted of ABCIResponses struct and height. Exposing
internal ABCI structures (which we store in state package) in RPC seems
bad to me for the following reasons:
1) high risk of breaking the API when somebody changes internal structs
(HAPPENED HERE!)
2) RPC is aware of ABCI, which I'm not sure we want
This commit is contained in:
@@ -43,12 +43,6 @@ func CalcValidatorsKey(height int64) []byte {
|
||||
return calcValidatorsKey(height)
|
||||
}
|
||||
|
||||
// SaveABCIResponses is an alias for the private saveABCIResponses method in
|
||||
// store.go, exported exclusively and explicitly for testing.
|
||||
func SaveABCIResponses(db dbm.DB, height int64, abciResponses *ABCIResponses) {
|
||||
saveABCIResponses(db, height, abciResponses)
|
||||
}
|
||||
|
||||
// SaveConsensusParamsInfo is an alias for the private saveConsensusParamsInfo
|
||||
// method in store.go, exported exclusively and explicitly for testing.
|
||||
func SaveConsensusParamsInfo(db dbm.DB, nextHeight, changeHeight int64, params types.ConsensusParams) {
|
||||
|
||||
Reference in New Issue
Block a user