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

Remove filters from BlockFilterIterator after a reorg #12939

Merged
merged 8 commits into from
Apr 28, 2024

Conversation

turbolay
Copy link
Collaborator

Should at least contribute to #12931

Cache.Remove(heightToRemove);
}
}

public void Clear()
{
Cache.Clear();
Copy link
Collaborator

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?

Copy link
Collaborator Author

@turbolay turbolay Apr 27, 2024

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.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is 27d94c3 OK?

Copy link
Collaborator

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.

Copy link
Collaborator

@kiminuo kiminuo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants