From 5b51d8d9c7b2065cde56f12b1f749bdd9202bf1e Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Thu, 2 Nov 2023 16:30:55 -0400 Subject: [PATCH] cache context query in plugin --- cosmos/x/evm/plugins/state/plugin.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cosmos/x/evm/plugins/state/plugin.go b/cosmos/x/evm/plugins/state/plugin.go index a0a513ae3..28038f942 100644 --- a/cosmos/x/evm/plugins/state/plugin.go +++ b/cosmos/x/evm/plugins/state/plugin.go @@ -140,9 +140,9 @@ func (p *plugin) SetPrecompileLogFactory(plf events.PrecompileLogFactory) { // Prepare sets up the context on the state plugin for use in JSON-RPC calls. // Prepare implements `core.StatePlugin`. func (p *plugin) Prepare(ctx context.Context) { - p.latestQueryContext = sdk.UnwrapSDKContext(ctx). + p.latestQueryContext, _ = sdk.UnwrapSDKContext(ctx). WithKVGasConfig(storetypes.GasConfig{}). - WithTransientKVGasConfig(storetypes.GasConfig{}) + WithTransientKVGasConfig(storetypes.GasConfig{}).CacheContext() } // Reset sets up the state plugin for execution of a new transaction. It sets up the snapshottable