Browse Source

abci/kvstore: return `LastBlockHeight` and `LastBlockAppHash` in `Info` (#4233)

Fixes #4177
pull/4236/head
Prince Sinha 5 years ago
committed by Anton Kaliaev
parent
commit
efc27ab0b9
2 changed files with 7 additions and 3 deletions
  1. +2
    -0
      CHANGELOG_PENDING.md
  2. +5
    -3
      abci/example/kvstore/kvstore.go

+ 2
- 0
CHANGELOG_PENDING.md View File

@ -55,6 +55,7 @@ program](https://hackerone.com/tendermint).
```
- ID is unique for each request;
- Request.ID is now optional. Notification is a Request without an ID. Previously ID="" or ID=0 were considered as notifications.
- [config] \#4046 Rename tag(s) to CompositeKey & places where tag is still present it was renamed to event or events. Find how a compositeKey is constructed [here](https://github.com/tendermint/tendermint/blob/6d05c531f7efef6f0619155cf10ae8557dd7832f/docs/app-dev/indexing-transactions.md)
- You will have to generate a new config for your Tendermint node(s)
@ -103,6 +104,7 @@ program](https://hackerone.com/tendermint).
- [cli] [\#4065](https://github.com/tendermint/tendermint/issues/4065) Add `--consensus.create_empty_blocks_interval` flag (@jgimeno)
- [docs] [\#4065](https://github.com/tendermint/tendermint/issues/4065) Document `--consensus.create_empty_blocks_interval` flag (@jgimeno)
- [crypto] [\#4190](https://github.com/tendermint/tendermint/pull/4190) Added SR25519 signature scheme
- [abci] \#4177 kvstore: Return `LastBlockHeight` and `LastBlockAppHash` in `Info` (@princesinha19)
### BUG FIXES:


+ 5
- 3
abci/example/kvstore/kvstore.go View File

@ -69,9 +69,11 @@ func NewApplication() *Application {
func (app *Application) Info(req types.RequestInfo) (resInfo types.ResponseInfo) {
return types.ResponseInfo{
Data: fmt.Sprintf("{\"size\":%v}", app.state.Size),
Version: version.ABCIVersion,
AppVersion: ProtocolVersion.Uint64(),
Data: fmt.Sprintf("{\"size\":%v}", app.state.Size),
Version: version.ABCIVersion,
AppVersion: ProtocolVersion.Uint64(),
LastBlockHeight: app.state.Height,
LastBlockAppHash: app.state.AppHash,
}
}


Loading…
Cancel
Save