Skip to content

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

Merged
clemahieu merged 1 commit intonanocurrency:developfrom
clemahieu:chep_rep_memory_weight
Apr 13, 2024
Merged

Use memory weight instead of exact weight when computing wallet reps.#4555
clemahieu merged 1 commit intonanocurrency:developfrom
clemahieu:chep_rep_memory_weight

Conversation

@clemahieu
Copy link
Copy Markdown
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
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