Skip to content

Commit

Permalink
Fix: Ensure set contact info to UDP port instead of QUIC (Backport #601
Browse files Browse the repository at this point in the history
… to v1.18) (#602)
  • Loading branch information
buffalu authored Mar 14, 2024
1 parent 4076be2 commit 10cb97f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions core/src/proxy/fetch_stage_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,10 @@ impl FetchStageManager {
fetch_connected = true;
pending_disconnect = false;

// unwrap safe here bc contact_info.tpu(Protocol::QUIC) and contact_info.tpu_forwards(Protocol::QUIC)
// are checked on startup
if let Err(e) = Self::set_tpu_addresses(&cluster_info, my_fallback_contact_info.tpu(Protocol::QUIC).unwrap(), my_fallback_contact_info.tpu_forwards(Protocol::QUIC).unwrap()) {
error!("error setting tpu or tpu_fwd to ({:?}, {:?}), error: {:?}", my_fallback_contact_info.tpu(Protocol::QUIC).unwrap(), my_fallback_contact_info.tpu_forwards(Protocol::QUIC).unwrap(), e);
// yes, using UDP here is extremely confusing for the validator
// since the entire network is running QUIC. However, it's correct.
if let Err(e) = Self::set_tpu_addresses(&cluster_info, my_fallback_contact_info.tpu(Protocol::UDP).unwrap(), my_fallback_contact_info.tpu_forwards(Protocol::UDP).unwrap()) {
error!("error setting tpu or tpu_fwd to ({:?}, {:?}), error: {:?}", my_fallback_contact_info.tpu(Protocol::UDP).unwrap(), my_fallback_contact_info.tpu_forwards(Protocol::UDP).unwrap(), e);
}
heartbeats_received = 0;
}
Expand Down

0 comments on commit 10cb97f

Please sign in to comment.