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

IsInitialBlockDownload: usually avoid locking #1728

Merged
merged 1 commit into from
Jul 7, 2020

Conversation

furszy
Copy link

@furszy furszy commented Jul 4, 2020

Straightforward, coming from btc@8007

Optimistically test the latch bool before taking the lock.
For all IsInitialBlockDownload calls after the first to return false,
this avoids the need to lock cs_main.

Coming from btc@f0fdda0181e1b05b66541bf235c6702c41664170
Copy link

@random-zebra random-zebra left a comment

Choose a reason for hiding this comment

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

Nice! utACK 9e378e4

Copy link
Collaborator

@Fuzzbawls Fuzzbawls left a comment

Choose a reason for hiding this comment

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

utACK 9e378e4

@furszy furszy merged commit 1c472eb into PIVX-Project:master Jul 7, 2020
@furszy furszy deleted the 2020_minor_locking_improvement branch November 29, 2022 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants