forked from cerc-io/laconicd-deprecated
Update Ethermint stateDB API
This commit is contained in:
parent
d01a73218a
commit
c8c7767059
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user