func (app *PersistentApplication) Commit() types.ResponseCommit {
	appCommit := app.app.Commit()
	lastBlock := LastBlockInfo{
		Height:  app.blockHeader.Height,
		AppHash: appCommit.Data,  
	}
	app.SaveLastBlock(lastBlock)
	return appCommit
}
Commit method commits the state and returns the application state hash
package app
import (
	"github.com/tendermint/tendermint/libs/log"
	"github.com/eeonevision/anychaindb/state"
	"github.com/globalsign/mgo"
	"github.com/globalsign/mgo/bson"
	"github.com/tendermint/tendermint/abci/types"
)
type PersistentApplication struct {
	app         *Application
	blockHeader types.Header
	changes     []types.Validator
}
func NewPersistentApplication(dbHost, dbName string) *PersistentApplication {
	stateDB, err := mgo.Dial(dbHost)
	if err != nil {
		panic("Error initialize Mongo DB: " + err.Error())
	}
	return &PersistentApplication{
		app: &Application{state: state.NewStateFromDB(stateDB.DB(dbName))},
	}
}
func (app *PersistentApplication) SetLogger(l log.Logger) {
	app.app.SetLogger(l)
}
func (app *PersistentApplication) Info(req types.RequestInfo) (resInfo types.ResponseInfo) {
	resInfo = app.app.Info()
	lastBlock := app.LoadLastBlock()
	resInfo.LastBlockHeight = lastBlock.Height
	resInfo.LastBlockAppHash = lastBlock.AppHash
	return resInfo
}
func (app *PersistentApplication) SetOption(reqSetOpt types.RequestSetOption) types.ResponseSetOption {
	return app.app.SetOption(reqSetOpt)
}
func (app *PersistentApplication) DeliverTx(tx []byte) types.ResponseDeliverTx {
	return app.app.DeliverTx(tx)
}
func (app *PersistentApplication) CheckTx(tx []byte) types.ResponseCheckTx {
	return app.app.CheckTx(tx)
}