You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// consensus pool does not need votes for slots other than root slot however the rewards container may still need them.
176
182
if vote_message.vote.slot() <= root_bank.slot(){
183
+
// the only module that takes a write lock on consensus_rewards is this one and it does not take the write lock while it is verifying votes so this should never block.
184
+
ifself
185
+
.consensus_rewards
186
+
.read()
187
+
.wants_vote(root_bank.slot(),&vote_message)
188
+
{
189
+
// XXX: actually verify and send the votes. The verification and sending should happen off the critical path.
warn!("could not send consensus metrics, receive side of channel is closed");
236
250
}
237
251
252
+
{
253
+
// Grabbing this lock should not contend with this module as this module takes the read lock during the verification phase which should be over by now.
254
+
// XXX: this can contend with the block creation loop. Consider using try_write() instead or other approaches to minimise it.
let verified_votes = self.verify_votes(votes_to_verify);
298
+
299
+
let rewards_votes = {
300
+
// the only module that takes a write lock on consensus_rewards is this one and it does not take the write lock while it is verifying votes so this should never block.
301
+
let guard = self.consensus_rewards.read();
302
+
let root_slot = self.sharable_banks.root().slot();
0 commit comments