diff --git a/src/Nethermind/Nethermind.Consensus/Processing/PrewarmerTxAdapter.cs b/src/Nethermind/Nethermind.Consensus/Processing/PrewarmerTxAdapter.cs index f9b0774fce8..c5c1efaf2eb 100644 --- a/src/Nethermind/Nethermind.Consensus/Processing/PrewarmerTxAdapter.cs +++ b/src/Nethermind/Nethermind.Consensus/Processing/PrewarmerTxAdapter.cs @@ -14,7 +14,7 @@ public class PrewarmerTxAdapter(ITransactionProcessorAdapter baseAdapter, BlockC { public TransactionResult Execute(Transaction transaction, ITxTracer txTracer) { - if (worldState is IPreBlockCaches preBlockCaches && preBlockCaches.IsWarmWorldState) + if (worldState.ScopeProvider is IPreBlockCaches { IsWarmWorldState: true }) { preWarmer.OnBeforeTxExecution(transaction); } diff --git a/src/Nethermind/Nethermind.Init/Modules/PrewarmerModule.cs b/src/Nethermind/Nethermind.Init/Modules/PrewarmerModule.cs index ebdc79106b0..935ee73eb4b 100644 --- a/src/Nethermind/Nethermind.Init/Modules/PrewarmerModule.cs +++ b/src/Nethermind/Nethermind.Init/Modules/PrewarmerModule.cs @@ -9,6 +9,7 @@ using Nethermind.Core.Container; using Nethermind.Evm; using Nethermind.Evm.State; +using Nethermind.Evm.TransactionProcessing; using Nethermind.State; using Nethermind.Trie; using Nethermind.Trie.Pruning; @@ -62,7 +63,8 @@ protected override void Load(ContainerBuilder builder) // Note: The use of FrozenDictionary means that this cannot be used for other processing env also due to risk of memory leak. return new CachedCodeInfoRepository(precompileProvider, originalCodeInfoRepository, blocksConfig.CachePrecompilesOnBlockProcessing ? preBlockCaches?.PrecompileCache : null); - }); + }) + .AddDecorator(); } } }