diff --git a/x/evm/watcher/querier.go b/x/evm/watcher/querier.go index 777c45011c..5afe928dde 100644 --- a/x/evm/watcher/querier.go +++ b/x/evm/watcher/querier.go @@ -282,6 +282,9 @@ func (q Querier) GetAccountFromRdb(addr sdk.AccAddress) (*types.EthAccount, erro } func (q Querier) DeleteAccountFromRdb(addr sdk.AccAddress) { + if !q.enabled() { + return + } q.store.Delete(append(prefixRpcDb, GetMsgAccountKey(addr.Bytes())...)) } @@ -328,6 +331,9 @@ func (q Querier) GetStateFromRdb(key []byte) ([]byte, error) { } func (q Querier) DeleteStateFromRdb(addr common.Address, key []byte) { + if !q.enabled() { + return + } q.store.Delete(append(prefixRpcDb, GetMsgStateKey(addr, key)...)) }