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

electrumx: fix race condition in client #4

Merged
merged 1 commit into from
Feb 27, 2024
Merged

Conversation

joshuasing
Copy link
Contributor

Summary
Fix a race condition in the electrumx client

Previously, the request ID stored in the client was incremented while the lock was held, however it was then read without the lock being held.

Changes

  • Fix race condition in electrumx package

@joshuasing joshuasing added type: bug This is a bug size: XS This change is very small (+/- <10) labels Feb 26, 2024
Previously, the request ID stored in the client was incremented while
the lock was held, however it was then read without the lock being held.
@joshuasing joshuasing changed the title Fix race condition in electrumx client electrumx: fix race condition in client Feb 26, 2024
Copy link
Contributor

@marcopeereboom marcopeereboom left a comment

Choose a reason for hiding this comment

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

Are we sure we pre increment? seems odd.

@joshuasing
Copy link
Contributor Author

Are we sure we pre increment? seems odd.

@marcopeereboom I am not sure, this was the previous behaviour except with the read in a lock.

@joshuasing joshuasing merged commit 9535e48 into main Feb 27, 2024
1 check passed
@joshuasing joshuasing deleted the joshua/electrumx-race branch February 27, 2024 13:06
web3cryptoguy pushed a commit to web3cryptoguy/heminetwork that referenced this pull request Nov 1, 2024
Previously, the request ID stored in the client was incremented while
the lock was held, however it was then read without the lock being held.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size: XS This change is very small (+/- <10) type: bug This is a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants