Created
October 20, 2025 16:18
-
-
Save alexpyattaev/745d6d6b56e8bc61cf84deebe04cbf92 to your computer and use it in GitHub Desktop.
Fake turbine peers for tests of agave retransmit
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- a/turbine/src/cluster_nodes.rs | |
| +++ b/turbine/src/cluster_nodes.rs | |
| @@ -444,6 +444,24 @@ fn get_nodes( | |
| Node { node, stake } | |
| }), | |
| ) | |
| + // Add a bunch of fake, unstaked nodes for testing. | |
| + .chain((0..5000).map(|i: u16| { | |
| + let addr_byte1 = (i / 256).min(255) as u8; | |
| + | |
| + let addr_byte2 = (i % 256).min(255) as u8; | |
| + | |
| + let contact_info = ContactInfo { | |
| + pubkey: Pubkey::new_unique(), | |
| + wallclock: timestamp(), | |
| + tvu_quic: None, | |
| + tvu_udp: Some(SocketAddr::new( | |
| + std::net::IpAddr::V4(std::net::Ipv4Addr::new(150, 150, addr_byte1, addr_byte2)), | |
| + 8080, | |
| + )), | |
| + }; | |
| + let node = NodeId::from(contact_info); | |
| + Node { node, stake: 0 } | |
| + })) | |
| // All staked nodes. | |
| .chain( | |
| stakes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment