add synchronization comment to handle_new_root (#19571)
This commit is contained in:
parent
8ac94b2cf4
commit
7a8eba10b2
|
@ -2703,6 +2703,8 @@ impl ReplayStage {
|
||||||
accounts_background_request_sender,
|
accounts_background_request_sender,
|
||||||
highest_confirmed_root,
|
highest_confirmed_root,
|
||||||
);
|
);
|
||||||
|
// Dropping the bank_forks write lock and reacquiring as a read lock is
|
||||||
|
// safe because updates to bank_forks are only made by a single thread.
|
||||||
let r_bank_forks = bank_forks.read().unwrap();
|
let r_bank_forks = bank_forks.read().unwrap();
|
||||||
let new_root_bank = &r_bank_forks[new_root];
|
let new_root_bank = &r_bank_forks[new_root];
|
||||||
if !*has_new_vote_been_rooted {
|
if !*has_new_vote_been_rooted {
|
||||||
|
|
Loading…
Reference in New Issue