Move avalanche logic to ClusterInfo

The simulator doesn't depend on RetransmitStage. It depends on
just one function, which is similar in spirit to many of the
methods in ClusterInfo.
This commit is contained in:
Greg Fitzgerald
2019-02-18 09:51:00 -07:00
committed by Grimes
parent 1c3f2bba6d
commit 0317583489
3 changed files with 54 additions and 53 deletions

View File

@ -2,11 +2,11 @@ use rayon::iter::{IntoParallelIterator, ParallelIterator};
use rayon::prelude::*;
use solana::bank::Bank;
use solana::cluster_info::{
ClusterInfo, DATA_PLANE_FANOUT, GROW_LAYER_CAPACITY, NEIGHBORHOOD_SIZE,
compute_retransmit_peers, ClusterInfo, DATA_PLANE_FANOUT, GROW_LAYER_CAPACITY,
NEIGHBORHOOD_SIZE,
};
use solana::contact_info::ContactInfo;
use solana::genesis_block::GenesisBlock;
use solana::retransmit_stage::compute_retransmit_peers;
use solana_sdk::pubkey::Pubkey;
use solana_sdk::signature::{Keypair, KeypairUtil};
use std::collections::{HashMap, HashSet};