diff --git a/state/database.go b/state/database.go index e60c31271..b93ae252f 100644 --- a/state/database.go +++ b/state/database.go @@ -43,8 +43,8 @@ type Database struct { codeDB dbm.DB ethTrieDB *ethtrie.Database - // TODO: Do we need this? - tracing bool + // TODO: Do we need this/document? + Tracing bool } // NewDatabase returns a reference to an initialized Database type which @@ -165,6 +165,12 @@ func (db *Database) ContractCodeSize(addrHash, codeHash ethcommon.Hash) (int, er return len(db.codeDB.Get(codeHash[:])), nil } +// Commit commits the underlying Cosmos SDK multi-store returning the commit +// ID. +func (db *Database) Commit() types.CommitID { + return db.stateStore.Commit() +} + // TrieDB implements Ethereum's state.Database interface. It returns Ethereum's // trie.Database low level trie database used for contract state storage. In // the context of Ethermint, it'll be used to solely store mappings of