-
Notifications
You must be signed in to change notification settings - Fork 623
Fix transaction processed counter not working #9270
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
Conversation
|
|
||
| public void OnBeforeTxExecution(Transaction transaction) | ||
| { | ||
| _currentBlockState?.IncrementTransactionCounter(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The IsToBeWarmedWorldState make sure that this is the main tx processing one. So it just need to increment the number.
| private bool _isInScope = false; | ||
| private readonly ILogger _logger; | ||
| private PreBlockCaches? PreBlockCaches { get; } | ||
| public bool IsToBeWarmedWorldState { get; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| public bool IsToBeWarmedWorldState { get; } | |
| public bool WarmWorldState { get; } |
Or PopulateCaches
Or Enabled
|
|
||
| public void OnBeforeTxExecution(Transaction transaction) | ||
| { | ||
| _currentBlockState?.IncrementTransactionCounter(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The IsToBeWarmedWorldState make sure that this is the main tx processing one. So it just need to increment the number.
| } | ||
| } | ||
|
|
||
| public class PrewarmerTxAdapter(ITransactionProcessorAdapter baseAdapter, BlockCachePreWarmer preWarmer, IWorldState worldState) : ITransactionProcessorAdapter |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move to own file?
| { | ||
| PreBlockCaches Caches { get; } | ||
| bool IsToBeWarmedWorldState { get; } | ||
| bool IsWarmWorldState { get; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not proper english? WarmWorldState would be better? But we are i IPreBlockCaches I would like the name not to contain WorldState if possible.
TransactionProcessedfield and used a prewarmer specific decorator instead.Types of changes
What types of changes does your code introduce?
Testing
Requires testing
If yes, did you write tests?
Notes on testing