From edf5ee209c646a51f1a7cfb89ce24df3d96c7dd3 Mon Sep 17 00:00:00 2001 From: drklee3 Date: Tue, 16 Apr 2024 15:04:37 -0700 Subject: [PATCH] Remove unused UnsetState --- x/evm/keeper/statedb.go | 31 ------------------------------- 1 file changed, 31 deletions(-) diff --git a/x/evm/keeper/statedb.go b/x/evm/keeper/statedb.go index 7aead58f07..8255056cdd 100644 --- a/x/evm/keeper/statedb.go +++ b/x/evm/keeper/statedb.go @@ -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)