Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add prewarmer to existing tests #7272

Merged
merged 2 commits into from
Aug 23, 2024
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 @@ -103,7 +103,8 @@ protected override BlockProcessor CreateBlockProcessor()
NullWithdrawalProcessor.Instance,
null,
null,
GasLimitCalculator as AuRaContractGasLimitOverride);
GasLimitCalculator as AuRaContractGasLimitOverride,
preWarmer: CreateBlockCachePreWarmer());
}

protected override Task AddBlocksOnStart() => Task.CompletedTask;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,8 @@ protected override BlockProcessor CreateBlockProcessor()
LimboLogs.Instance,
BlockTree,
NullWithdrawalProcessor.Instance,
null
);
null,
preWarmer: CreateBlockCachePreWarmer());
}

protected override Task AddBlocksOnStart() => Task.CompletedTask;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,10 @@ protected override BlockProcessor CreateBlockProcessor()
BlockTree,
NullWithdrawalProcessor.Instance,
null,
PermissionBasedTxFilter);
PermissionBasedTxFilter,
null,
null,
CreateBlockCachePreWarmer());
}

protected override async Task AddBlocksOnStart()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,11 @@ protected virtual IBlockProcessor CreateBlockProcessor() =>
State,
ReceiptStorage,
new BlockhashStore(SpecProvider, State),
LogManager);
LogManager,
preWarmer: CreateBlockCachePreWarmer());

protected virtual IBlockCachePreWarmer CreateBlockCachePreWarmer() =>
new BlockCachePreWarmer(new ReadOnlyTxProcessingEnvFactory(WorldStateManager, BlockTree, SpecProvider, LogManager, WorldStateManager.GlobalWorldState), SpecProvider, LogManager, WorldStateManager.GlobalWorldState);

public async Task WaitForNewHead()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,8 @@ protected override IBlockProcessor CreateBlockProcessor()
ReceiptStorage,
new BlockhashStore(SpecProvider, State),
LogManager,
WithdrawalProcessor);
WithdrawalProcessor,
preWarmer: CreateBlockCachePreWarmer());

return new TestBlockProcessorInterceptor(processor, _blockProcessingThrottle);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,8 @@ protected override IBlockProcessor CreateBlockProcessor()
ReceiptStorage,
new BlockhashStore(SpecProvider, State),
LogManager,
WithdrawalProcessor);
WithdrawalProcessor,
preWarmer: CreateBlockCachePreWarmer());

return new TestBlockProcessorInterceptor(processor, _blockProcessingThrottle);
}
Expand Down