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

Use memory weight instead of exact weight when computing wallet reps. #4555

Merged
merged 1 commit into from
Apr 13, 2024

Conversation

clemahieu
Copy link
Contributor

This function is used to check if an account has enough weight to be a rep. If this account isn't in memory because of its high weight, by definition it doesn't have enough weight.

This also eliminates a database transaction while holding the reps_cache_mutex in nano::wallets::compute_reps. This mutex is in several hot paths of code such as nano::wallets::reps being called from message_visitor::confirm_req

This function is used to check if an account has enough weight to be a rep. If this account isn't in memory because of its high weight, by definition it doesn't have enough weight.
This also eliminates a database transaction while holding the reps_cache_mutex in nano::wallets::compute_reps. This mutex is in several hot paths of code such as nano::wallets::reps being called from message_visitor::confirm_req
@clemahieu clemahieu merged commit 30a0d1e into nanocurrency:develop Apr 13, 2024
24 of 26 checks passed
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