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

Wallet store adhoc keys inconsistency with reps container #3085

Merged
merged 1 commit into from
Jan 28, 2021

Conversation

wezrule
Copy link
Contributor

@wezrule wezrule commented Jan 14, 2021

When a wallet key is added in insert_adhoc but it's possible that the write transaction hasn't commited while the representatives container has been updated. If nano::wallets::compute_reps is called at the same time the representatives are cleared and never repopulated from the store. This was made more evident with test failures in #2871.

Also modifying the write_transaction so that commit () can be called without having to renew it before destruction, so it operates similarly to std::unique_lock for instance.

There is also an issue with deterministic wallet inserts, which can be handled separately (as well as adding tests)

@wezrule wezrule added the bug label Jan 14, 2021
@wezrule wezrule added this to the V22.0 milestone Jan 14, 2021
@wezrule wezrule requested a review from SergiySW January 14, 2021 11:30
@wezrule wezrule self-assigned this Jan 14, 2021
@wezrule wezrule merged commit 4c4171d into nanocurrency:develop Jan 28, 2021
@wezrule wezrule deleted the adhoc_rep_inconsistency branch January 28, 2021 14:35
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.

2 participants