Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@theflyingcodr
Copy link
Contributor

Adding a fix for data race in getPubKeyBytes. Discovered a condition …in which the read and write can be called at the same type by different threads, especially when deriving keys concurrently.

Added 'Once' to prevent this.

Unit test added which when ran with old code and -race failed due to the race, new code does not trigger the race detector.

…in which the read and write can be called at the same type by different threads, especially when deriving keys concurrently. Added Once to prevent this
@theflyingcodr theflyingcodr self-assigned this Nov 18, 2021
@theflyingcodr theflyingcodr added the bug Something isn't working label Nov 18, 2021
@theflyingcodr theflyingcodr merged commit 595348f into master Nov 18, 2021
@theflyingcodr theflyingcodr deleted the fix/pubKeyBytes_race branch November 18, 2021 17:59
@mergify mergify bot added the bug-P3 label Nov 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working bug-P3

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants