* fixup! * fixups! * send the vote and count it * actually vote * test * Spelling fixes * Process the voting transaction in the leader's bank * Send tokens to the leader * Give leader tokens in more cases * Test for write_stage::leader_vote * Request airdrop inside fullnode and not the script * Change readme to indicate that drone should be up before leader And start drone before leader in snap scripts * Rename _kp => _keypair for keypairs and other review fixups * Remove empty else * tweak test_leader_vote numbers to be closer to testing 2/3 boundary * combine creating blob and transaction for leader/validator
21 lines
521 B
Rust
21 lines
521 B
Rust
use crdt::NodeInfo;
|
|
use nat::udp_random_bind;
|
|
use std::time::Duration;
|
|
use thin_client::ThinClient;
|
|
|
|
pub fn mk_client(r: &NodeInfo) -> ThinClient {
|
|
let requests_socket = udp_random_bind(8000, 10000, 5).unwrap();
|
|
let transactions_socket = udp_random_bind(8000, 10000, 5).unwrap();
|
|
|
|
requests_socket
|
|
.set_read_timeout(Some(Duration::new(1, 0)))
|
|
.unwrap();
|
|
|
|
ThinClient::new(
|
|
r.contact_info.rpu,
|
|
requests_socket,
|
|
r.contact_info.tpu,
|
|
transactions_socket,
|
|
)
|
|
}
|