Update NewCommitStateDB constructor to use state keys

This commit is contained in:
Aleksandr Bezobchuk 2018-10-04 12:12:06 -04:00
parent 3c47af91ab
commit 90a3dd3d46

View File

@ -72,10 +72,12 @@ type CommitStateDB struct {
// NewCommitStateDB returns a reference to a newly initialized CommitStateDB // NewCommitStateDB returns a reference to a newly initialized CommitStateDB
// which implements Geth's state.StateDB interface. // which implements Geth's state.StateDB interface.
func NewCommitStateDB(ctx sdk.Context, am auth.AccountMapper) (*CommitStateDB, error) { func NewCommitStateDB(ctx sdk.Context, am auth.AccountMapper, storageKey, codeKey sdk.StoreKey) (*CommitStateDB, error) {
return &CommitStateDB{ return &CommitStateDB{
ctx: ctx, ctx: ctx,
am: am, am: am,
storageKey: storageKey,
codeKey: codeKey,
stateObjects: make(map[ethcmn.Address]*stateObject), stateObjects: make(map[ethcmn.Address]*stateObject),
stateObjectsDirty: make(map[ethcmn.Address]struct{}), stateObjectsDirty: make(map[ethcmn.Address]struct{}),
logs: make(map[ethcmn.Hash][]*ethtypes.Log), logs: make(map[ethcmn.Hash][]*ethtypes.Log),