-
Notifications
You must be signed in to change notification settings - Fork 35.5k
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 missing lock in submitblock #6007
Conversation
This just fixes the bug, it would be nice to use threadsafetey.h annotations, but I believe that requires build-system changes as well. |
if (pindex->nStatus & BLOCK_FAILED_MASK) | ||
return "duplicate-invalid"; | ||
// Otherwise, we might only have the header - process the block before returning | ||
bool fBlockPresent; |
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.
Little nit: wouldn't be better to explicitly initialize this to false 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.
ehhh, lol yea
09834ee
to
eb63bf8
Compare
This looks good to me now. untested ACK. |
utACK |
1 similar comment
utACK |
eb63bf8 Fix missing lock in submitblock (Matt Corallo)
Cherry-picked to 0.10 as eae305f |
Also for 0.10