Skip to content

Commit

Permalink
Use cluster info functions for tpu (#345)
Browse files Browse the repository at this point in the history
  • Loading branch information
buffalu committed Aug 24, 2023
1 parent d86d4f8 commit df38329
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 28 deletions.
12 changes: 6 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions core/src/bundle_stage/bundle_packet_receiver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,7 @@ mod tests {
// in the same order they were originally
let bank = &bank_forks.read().unwrap().working_bank();
let new_bank = Arc::new(Bank::new_from_parent(
bank,
bank.clone(),
bank.collector_id(),
bank.slot() + 1,
));
Expand Down Expand Up @@ -835,7 +835,7 @@ mod tests {
// create new bank then call process_bundles again, expect to see [bundles1,bundles2]
let bank = &bank_forks.read().unwrap().working_bank();
let new_bank = Arc::new(Bank::new_from_parent(
bank,
bank.clone(),
bank.collector_id(),
bank.slot() + 1,
));
Expand Down
2 changes: 1 addition & 1 deletion core/src/immutable_deserialized_bundle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ mod tests {
} = create_genesis_config(10_000);
let parent = Arc::new(Bank::new_no_wallclock_throttle_for_tests(&genesis_config));
let vote_only_bank = Arc::new(Bank::new_from_parent_with_options(
&parent,
parent,
&Pubkey::new_unique(),
1,
NewBankOptions {
Expand Down
7 changes: 2 additions & 5 deletions core/src/proxy/fetch_stage_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,11 +159,8 @@ impl FetchStageManager {
tpu_address: SocketAddr,
tpu_forward_address: SocketAddr,
) -> Result<(), contact_info::Error> {
let mut new_contact_info = cluster_info.my_contact_info();
// TODO (LB): double check protocol!!!!!!
new_contact_info.set_tpu(tpu_address)?;
new_contact_info.set_tpu_forwards(tpu_forward_address)?;
cluster_info.set_my_contact_info(new_contact_info);
cluster_info.set_tpu(tpu_address)?;
cluster_info.set_tpu_forwards(tpu_forward_address)?;
Ok(())
}

Expand Down
27 changes: 14 additions & 13 deletions programs/sbf/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tip-distributor/src/stake_meta_generator_workflow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ mod tests {
bank.squash();

Arc::new(Bank::new_from_parent(
bank,
bank.clone(),
&Pubkey::default(),
bank.get_slots_in_epoch(bank.epoch()) + bank.slot(),
))
Expand Down

0 comments on commit df38329

Please sign in to comment.