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

Add missing lock in submitblock #6007

Merged
merged 1 commit into from
Apr 14, 2015
Merged

Conversation

TheBlueMatt
Copy link
Contributor

Also for 0.10

@TheBlueMatt
Copy link
Contributor Author

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;
Copy link
Contributor

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 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ehhh, lol yea

@gmaxwell gmaxwell added this to the 0.10.0 milestone Apr 13, 2015
@gmaxwell
Copy link
Contributor

This looks good to me now. untested ACK.

@luke-jr
Copy link
Member

luke-jr commented Apr 13, 2015

utACK

1 similar comment
@laanwj
Copy link
Member

laanwj commented Apr 14, 2015

utACK

@laanwj laanwj merged commit eb63bf8 into bitcoin:master Apr 14, 2015
laanwj added a commit that referenced this pull request Apr 14, 2015
eb63bf8 Fix missing lock in submitblock (Matt Corallo)
laanwj pushed a commit that referenced this pull request Apr 14, 2015
@laanwj
Copy link
Member

laanwj commented Apr 14, 2015

Cherry-picked to 0.10 as eae305f

@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants