@@ -136,9 +136,6 @@ pub const DEFAULT_NUM_TVU_RECEIVE_SOCKETS: NonZeroUsize = MINIMUM_NUM_TVU_RECEIV
136136pub const MINIMUM_NUM_TVU_RETRANSMIT_SOCKETS : NonZeroUsize = NonZeroUsize :: new ( 1 ) . unwrap ( ) ;
137137pub const DEFAULT_NUM_TVU_RETRANSMIT_SOCKETS : NonZeroUsize = NonZeroUsize :: new ( 12 ) . unwrap ( ) ;
138138
139- /// Minimum stake required for a node to bypass the initial ping check when joining gossip.
140- pub ( crate ) const MIN_STAKE_TO_SKIP_PING : u64 = 10_000 * solana_native_token:: LAMPORTS_PER_SOL ;
141-
142139#[ derive( Debug , PartialEq , Eq , Error ) ]
143140pub enum ClusterInfoError {
144141 #[ error( "NoPeers" ) ]
@@ -2019,7 +2016,6 @@ impl ClusterInfo {
20192016 & mut rng,
20202017 & self_keypair,
20212018 value,
2022- stakes,
20232019 & self . socket_addr_space ,
20242020 & self . ping_cache ,
20252021 & mut pings,
@@ -2500,19 +2496,14 @@ fn verify_gossip_addr<R: Rng + CryptoRng>(
25002496 rng : & mut R ,
25012497 keypair : & Keypair ,
25022498 value : & CrdsValue ,
2503- stakes : & HashMap < Pubkey , u64 > ,
25042499 socket_addr_space : & SocketAddrSpace ,
25052500 ping_cache : & Mutex < PingCache > ,
25062501 pings : & mut Vec < ( SocketAddr , Ping ) > ,
25072502) -> bool {
2508- let ( pubkey , addr) = match value. data ( ) {
2509- CrdsData :: ContactInfo ( node) => ( node. pubkey ( ) , node . gossip ( ) ) ,
2503+ let addr = match value. data ( ) {
2504+ CrdsData :: ContactInfo ( node) => node. gossip ( ) ,
25102505 _ => return true , // If not a contact-info, nothing to verify.
25112506 } ;
2512- // For (sufficiently) staked nodes, don't bother with ping/pong.
2513- if stakes. get ( pubkey) . copied ( ) >= Some ( MIN_STAKE_TO_SKIP_PING ) {
2514- return true ;
2515- }
25162507 // Invalid addresses are not verifiable.
25172508 let Some ( addr) = addr. filter ( |addr| socket_addr_space. check ( addr) ) else {
25182509 return false ;
0 commit comments