Use KVMemCache for checkpointing IAVL tree as they are not go-routine safe...

This commit is contained in:
Ethan Frey
2017-07-27 15:31:34 -04:00
parent 27e7fbe4cf
commit dfdbfa04c2
6 changed files with 68 additions and 112 deletions
+6 -1
View File
@@ -120,8 +120,13 @@ func (s *Store) Info() abci.ResponseInfo {
// Commit implements abci.Application
func (s *Store) Commit() abci.Result {
s.hash = s.State.Hash()
var err error
s.height++
s.hash, err = s.State.Hash()
if err != nil {
return abci.NewError(abci.CodeType_InternalError, err.Error())
}
s.logger.Debug("Commit synced",
"height", s.height,
"hash", fmt.Sprintf("%X", s.hash))