-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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 VoteAccount::node_pubkey()
#26207
Use VoteAccount::node_pubkey()
#26207
Conversation
d244d14
to
956587a
Compare
@buffalu Can't add you to the reviewer's list, but want to make sure you're in the loop. |
nice find, thanks clippy gods |
This does not seem to be necessary. The only place that All other references are shared-lock, so they can't cause any lock contention. So, this is a false positive warning, and no need to add manual |
956587a
to
edd1a9d
Compare
VoteAccounts::vote_state()
holding the lock too longVoteAccounts::vote_state()
holding the lock too long
edd1a9d
to
4700099
Compare
Thanks for the explanation. I agree.
I tried, but since the lints are in a version newer than 1.60.0, CI |
VoteAccounts::vote_state()
holding the lock too longVoteAccount::node_pubkey()
The original intent of this PR changed. See the discussion (and #26207 (comment) for more info).
Problem
Original:
Clippy was warning about
temporary with significant drop in match scrutinee
for a bunch of uses ofVoteAccounts::vote_state()
. These locks are all reader locks, and there will never be another writer (since the one was within aOnce
), so the clippy warnings are safe to ignore.See #26207 (comment) for more info.
Related to #24836
Actual:
No problem, just an opportunity to refactor 😐
Summary of Changes
Use
VoteAccount::node_pubkey()
when possible.