Fix off-by-one in handshake, add debug logging
This commit is contained in:
parent
98e615709a
commit
724fb065f2
@ -59,6 +59,9 @@ func (app *Basecoin) GetState() sm.SimpleDB {
|
||||
// Info - ABCI
|
||||
func (app *Basecoin) Info(req abci.RequestInfo) abci.ResponseInfo {
|
||||
resp := app.state.Info()
|
||||
app.logger.Debug("Info",
|
||||
"height", resp.LastBlockHeight,
|
||||
"hash", fmt.Sprintf("%X", resp.LastBlockAppHash))
|
||||
app.height = resp.LastBlockHeight
|
||||
return abci.ResponseInfo{
|
||||
Data: fmt.Sprintf("Basecoin v%v", version.Version),
|
||||
@ -70,7 +73,6 @@ func (app *Basecoin) Info(req abci.RequestInfo) abci.ResponseInfo {
|
||||
// InitState - used to setup state (was SetOption)
|
||||
// to be used by InitChain later
|
||||
func (app *Basecoin) InitState(key string, value string) string {
|
||||
|
||||
module, key := splitKey(key)
|
||||
state := app.state.Append()
|
||||
|
||||
|
||||
@ -99,7 +99,7 @@ func (s *Store) Info() abci.ResponseInfo {
|
||||
"hash", fmt.Sprintf("%X", s.Hash()))
|
||||
return abci.ResponseInfo{
|
||||
Data: cmn.Fmt("size:%v", s.State.Size()),
|
||||
LastBlockHeight: s.height - 1,
|
||||
LastBlockHeight: s.height,
|
||||
LastBlockAppHash: s.Hash(),
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user