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 saving tokens at wallet creation time #586

Merged
merged 1 commit into from
Feb 21, 2024

Conversation

swansontec
Copy link
Contributor

@swansontec swansontec commented Feb 21, 2024

This was a race condition between loading the tokens file off disk and writing the tokens file at wallet creation time. We solve the race condition by skipping the dispatch if there is no file on disk. That way, when we create a brand-new wallet, the initial tokens always win.

CHANGELOG

Does this branch warrant an entry to the CHANGELOG?

  • Yes
  • No

Dependencies

none

Description

none

This was a race condition between loading the tokens file off disk and writing the tokens file at wallet creation time. We solve the race condition by skipping the `dispatch` if there is no file on disk. That way, when we create a brand-new wallet, the initial tokens always win the race.
@swansontec swansontec force-pushed the william/fix-wallet-token-creation branch from f6c5709 to eae1fbc Compare February 21, 2024 21:56
@swansontec swansontec merged commit 8d5cf77 into master Feb 21, 2024
2 checks passed
@swansontec swansontec deleted the william/fix-wallet-token-creation branch February 21, 2024 22:32
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