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

Fix race condition in mini wallet #582

Merged
merged 4 commits into from
Jan 18, 2024
Merged

Fix race condition in mini wallet #582

merged 4 commits into from
Jan 18, 2024

Conversation

pm47
Copy link
Member

@pm47 pm47 commented Jan 18, 2024

When subscribing to a new address, we register a new handler for ScriptHashSubscriptionResponse before updating the scriptHashes map. If Electrum notifies us too quickly, processSubscriptionResponse will be unable to identify the scriptHash.

@pm47 pm47 requested a review from t-bast January 18, 2024 09:58
Copy link
Member

@t-bast t-bast left a comment

Choose a reason for hiding this comment

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

LGTM

@pm47 pm47 requested a review from t-bast January 18, 2024 14:31
@pm47 pm47 merged commit 61b1431 into master Jan 18, 2024
2 checks passed
@pm47 pm47 deleted the race-condition-miniwallet branch January 18, 2024 14:48
pm47 added a commit that referenced this pull request Jan 18, 2024
When subscribing to a new address, we register a new handler for `ScriptHashSubscriptionResponse` *before* updating the `scriptHashes` map. If Electrum notifies us too quickly, `processSubscriptionResponse` will be unable to identify the `scriptHash`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants