mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-21 08:51:32 +00:00
rpc: /block_results fix docs + write test + restructure response
BREAKING Example response: ```json { "jsonrpc": "2.0", "id": "", "result": { "height": "2109", "txs_results": 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:
@ -131,7 +131,7 @@ func (blockExec *BlockExecutor) ApplyBlock(state State, blockID types.BlockID, b
|
||||
fail.Fail() // XXX
|
||||
|
||||
// Save the results before we commit.
|
||||
saveABCIResponses(blockExec.db, block.Height, abciResponses)
|
||||
SaveABCIResponses(blockExec.db, block.Height, abciResponses)
|
||||
|
||||
fail.Fail() // XXX
|
||||
|
||||
|
Reference in New Issue
Block a user