removes &Arc<Self> receivers (#14234)
This commit is contained in:
parent
c276513b84
commit
a14cfd660a
@ -1731,7 +1731,7 @@ impl ClusterInfo {
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
fn handle_adopt_shred_version(self: &Arc<Self>, adopt_shred_version: &mut bool) {
|
fn handle_adopt_shred_version(&self, adopt_shred_version: &mut bool) {
|
||||||
// Adopt the entrypoint's `shred_version` if ours is unset
|
// Adopt the entrypoint's `shred_version` if ours is unset
|
||||||
if *adopt_shred_version {
|
if *adopt_shred_version {
|
||||||
// If gossip was given an entrypoint, look up the ContactInfo by the given
|
// If gossip was given an entrypoint, look up the ContactInfo by the given
|
||||||
@ -1765,7 +1765,7 @@ impl ClusterInfo {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn handle_purge(
|
fn handle_purge(
|
||||||
self: &Arc<Self>,
|
&self,
|
||||||
thread_pool: &ThreadPool,
|
thread_pool: &ThreadPool,
|
||||||
bank_forks: &Option<Arc<RwLock<BankForks>>>,
|
bank_forks: &Option<Arc<RwLock<BankForks>>>,
|
||||||
stakes: &HashMap<Pubkey, u64>,
|
stakes: &HashMap<Pubkey, u64>,
|
||||||
|
@ -3823,10 +3823,10 @@ impl Bank {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Compute all the parents of the bank including this bank itself
|
/// Compute all the parents of the bank including this bank itself
|
||||||
pub fn parents_inclusive(self: &Arc<Self>) -> Vec<Arc<Bank>> {
|
pub fn parents_inclusive(self: Arc<Self>) -> Vec<Arc<Bank>> {
|
||||||
let mut all = vec![self.clone()];
|
let mut parents = self.parents();
|
||||||
all.extend(self.parents().into_iter());
|
parents.insert(0, self);
|
||||||
all
|
parents
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn store_account(&self, pubkey: &Pubkey, account: &Account) {
|
pub fn store_account(&self, pubkey: &Pubkey, account: &Account) {
|
||||||
@ -4033,7 +4033,7 @@ impl Bank {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_largest_accounts(
|
pub fn get_largest_accounts(
|
||||||
self: &Arc<Self>,
|
&self,
|
||||||
num: usize,
|
num: usize,
|
||||||
filter_by_address: &HashSet<Pubkey>,
|
filter_by_address: &HashSet<Pubkey>,
|
||||||
filter: AccountAddressFilter,
|
filter: AccountAddressFilter,
|
||||||
@ -11587,7 +11587,7 @@ pub(crate) mod tests {
|
|||||||
// are currently discoverable, previous parents should have
|
// are currently discoverable, previous parents should have
|
||||||
// been squashed
|
// been squashed
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
current_minor_fork_bank.parents_inclusive().len(),
|
current_minor_fork_bank.clone().parents_inclusive().len(),
|
||||||
num_new_banks + 1,
|
num_new_banks + 1,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user