Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
4 changes: 3 additions & 1 deletion src/Nethermind/Nethermind.Init/Modules/PrewarmerModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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<ITransactionProcessorAdapter, PrewarmerTxAdapter>();
}
}
}