-
Notifications
You must be signed in to change notification settings - Fork 492
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
Remove filters from BlockFilterIterator after a reorg #12939
Remove filters from BlockFilterIterator after a reorg #12939
Conversation
Cache.Remove(heightToRemove); | ||
} | ||
} | ||
|
||
public void Clear() | ||
{ | ||
Cache.Clear(); |
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.
This line is not under lock. It should, shouldn't it?
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.
I was thinking about it as well but it's under lock when it's used. We can rename it ClearNoLock
if you want?
Then create a new function for the usage in WFP
While I know that using a traditional lock when already being in the critical state of the lock has no effect, I'm unsure about AsyncLock
's behavior, hence I didn't add it here.
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.
Is 27d94c3 OK?
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.
Yes. Thanks. I just improved it by 418f810 as that's harder to break.
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.
LGTM
Should at least contribute to #12931