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

core: solve a remote-import/local-mine data race #2793

Merged
merged 1 commit into from
Jul 12, 2016

Conversation

karalabe
Copy link
Member

@karalabe karalabe commented Jul 8, 2016

The blockchain.WriteBlock is a method used by the miner whenever it mints a new block to have it imported into the local chain. This method before acquiring the lock on the blockchain itself however retrieved the current total difficulty, for which it needed the current block's hash. Accessing the current block without a lock is a bit no-no, as it may concurrently be modified by a remote import.

@robotally
Copy link

robotally commented Jul 8, 2016

Vote Count Reviewers
👍 1 @fjl
👎 0

Updated: Tue Jul 12 12:04:40 UTC 2016

@fjl
Copy link
Contributor

fjl commented Jul 12, 2016

👍

@karalabe karalabe merged commit 2b7aff2 into ethereum:develop Jul 12, 2016
@obscuren obscuren removed the review label Jul 12, 2016
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.

4 participants