core: extend Blockchainer interface with StateHeight()

Allow to query current verified state root height.
This commit is contained in:
Evgenii Stratonikov 2020-06-22 10:49:48 +03:00
parent f665843887
commit f8051da0bd
5 changed files with 14 additions and 7 deletions

View file

@ -745,10 +745,9 @@ func (s *Server) verifyProof(ps request.Params) (interface{}, *response.Error) {
}
func (s *Server) getStateHeight(_ request.Params) (interface{}, *response.Error) {
height := s.chain.BlockHeight()
return &result.StateHeight{
BlockHeight: height,
StateHeight: height,
BlockHeight: s.chain.BlockHeight(),
StateHeight: s.chain.StateHeight(),
}, nil
}