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:
Justin Starry
2021-12-29 12:34:31 -06:00
committed by GitHub
parent d20a3774db
commit b1d9a2e60e
13 changed files with 209 additions and 53 deletions

View File

@@ -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,
}
}