Skip to content

Commit

Permalink
Remove unused UnsetState
Browse files Browse the repository at this point in the history
  • Loading branch information
drklee3 committed Apr 16, 2024
1 parent cc1d0e5 commit edf5ee2
Showing 1 changed file with 0 additions and 31 deletions.
31 changes: 0 additions & 31 deletions x/evm/keeper/statedb.go
Original file line number Diff line number Diff line change
Expand Up @@ -284,37 +284,6 @@ func (k *Keeper) SetState(ctx sdk.Context, addr common.Address, key, value commo
)
}

/*
func (k *Keeper) UnsetState(ctx sdk.Context, addr common.Address, key common.Hash) error {
ctxStore := ctx.KVStore(k.storeKey)
gasKVStore, ok := ctxStore.(*gaskv.Store)
if !ok {
return fmt.Errorf("expected gaskv.Store, got %T", ctxStore)
}
// Use parent of store and try as cachekv.Store
ctxStore = gasKVStore.GetParent()
cacheKVStore, ok := ctxStore.(*cachekv.Store)
if !ok {
return fmt.Errorf("expected cachekv.Store, got %T", ctxStore)
}
storeKey := types.AddressStoragePrefix(addr)
storeKey = append(storeKey, key.Bytes()...)
cacheKVStore.Unset(storeKey)
k.Logger(ctx).Debug(
"state unset",
"ethereum-address", addr.Hex(),
"key", key.Hex(),
)
return nil
}
*/

// SetCode set contract code, delete if code is empty.
func (k *Keeper) SetCode(ctx sdk.Context, codeHash, code []byte) {
store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefixCode)
Expand Down

0 comments on commit edf5ee2

Please sign in to comment.