Don't forward packets received from TPU forwards port (#22078)
* Don't forward packets received from TPU forwards port * Add banking stage test
This commit is contained in:
@ -14300,11 +14300,7 @@ pub(crate) mod tests {
|
||||
let validator_vote_keypairs0 = ValidatorVoteKeypairs::new_rand();
|
||||
let validator_vote_keypairs1 = ValidatorVoteKeypairs::new_rand();
|
||||
let validator_keypairs = vec![&validator_vote_keypairs0, &validator_vote_keypairs1];
|
||||
let GenesisConfigInfo {
|
||||
genesis_config,
|
||||
mint_keypair: _,
|
||||
voting_keypair: _,
|
||||
} = create_genesis_config_with_vote_accounts(
|
||||
let GenesisConfigInfo { genesis_config, .. } = create_genesis_config_with_vote_accounts(
|
||||
1_000_000_000,
|
||||
&validator_keypairs,
|
||||
vec![10_000; 2],
|
||||
|
@ -601,8 +601,8 @@ mod tests {
|
||||
let leader_keypair = Keypair::new();
|
||||
let GenesisConfigInfo {
|
||||
mut genesis_config,
|
||||
mint_keypair: _,
|
||||
voting_keypair,
|
||||
..
|
||||
} = create_genesis_config_with_leader(10_000, &leader_keypair.pubkey(), 1_000);
|
||||
let slots_in_epoch = 32;
|
||||
genesis_config.epoch_schedule = EpochSchedule::new(slots_in_epoch);
|
||||
|
@ -52,6 +52,7 @@ pub struct GenesisConfigInfo {
|
||||
pub genesis_config: GenesisConfig,
|
||||
pub mint_keypair: Keypair,
|
||||
pub voting_keypair: Keypair,
|
||||
pub validator_pubkey: Pubkey,
|
||||
}
|
||||
|
||||
pub fn create_genesis_config(mint_lamports: u64) -> GenesisConfigInfo {
|
||||
@ -84,10 +85,11 @@ pub fn create_genesis_config_with_vote_accounts_and_cluster_type(
|
||||
let voting_keypair =
|
||||
Keypair::from_bytes(&voting_keypairs[0].borrow().vote_keypair.to_bytes()).unwrap();
|
||||
|
||||
let validator_pubkey = voting_keypairs[0].borrow().node_keypair.pubkey();
|
||||
let genesis_config = create_genesis_config_with_leader_ex(
|
||||
mint_lamports,
|
||||
&mint_keypair.pubkey(),
|
||||
&voting_keypairs[0].borrow().node_keypair.pubkey(),
|
||||
&validator_pubkey,
|
||||
&voting_keypairs[0].borrow().vote_keypair.pubkey(),
|
||||
&voting_keypairs[0].borrow().stake_keypair.pubkey(),
|
||||
stakes[0],
|
||||
@ -102,6 +104,7 @@ pub fn create_genesis_config_with_vote_accounts_and_cluster_type(
|
||||
genesis_config,
|
||||
mint_keypair,
|
||||
voting_keypair,
|
||||
validator_pubkey,
|
||||
};
|
||||
|
||||
for (validator_voting_keypairs, stake) in voting_keypairs[1..].iter().zip(&stakes[1..]) {
|
||||
@ -159,6 +162,7 @@ pub fn create_genesis_config_with_leader(
|
||||
genesis_config,
|
||||
mint_keypair,
|
||||
voting_keypair,
|
||||
validator_pubkey: *validator_pubkey,
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user