Tweaked connection limits to be a bit more aggressive
This commit is contained in:
parent
eef193e8bd
commit
c9f3f5e544
@ -68,7 +68,7 @@ pub struct Handshake {
|
|||||||
|
|
||||||
const AUTH_PACKET_SIZE: usize = 307;
|
const AUTH_PACKET_SIZE: usize = 307;
|
||||||
const ACK_PACKET_SIZE: usize = 210;
|
const ACK_PACKET_SIZE: usize = 210;
|
||||||
const HANDSHAKE_TIMEOUT: u64 = 30000;
|
const HANDSHAKE_TIMEOUT: u64 = 5000;
|
||||||
|
|
||||||
impl Handshake {
|
impl Handshake {
|
||||||
/// Create a new handshake object
|
/// Create a new handshake object
|
||||||
|
@ -46,8 +46,8 @@ type Slab<T> = ::slab::Slab<T, usize>;
|
|||||||
|
|
||||||
const _DEFAULT_PORT: u16 = 30304;
|
const _DEFAULT_PORT: u16 = 30304;
|
||||||
const MAX_SESSIONS: usize = 1024;
|
const MAX_SESSIONS: usize = 1024;
|
||||||
const MAX_HANDSHAKES: usize = 64;
|
const MAX_HANDSHAKES: usize = 80;
|
||||||
const MAX_HANDSHAKES_PER_ROUND: usize = 8;
|
const MAX_HANDSHAKES_PER_ROUND: usize = 32;
|
||||||
const MAINTENANCE_TIMEOUT: u64 = 1000;
|
const MAINTENANCE_TIMEOUT: u64 = 1000;
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
@ -977,3 +977,13 @@ fn key_save_load() {
|
|||||||
let r = load_key(temp_path.as_path());
|
let r = load_key(temp_path.as_path());
|
||||||
assert_eq!(key, r.unwrap());
|
assert_eq!(key, r.unwrap());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn host_client_url() {
|
||||||
|
let mut config = NetworkConfiguration::new();
|
||||||
|
let key = h256_from_hex("6f7b0d801bc7b5ce7bbd930b84fd0369b3eb25d09be58d64ba811091046f3aa2");
|
||||||
|
config.use_secret = Some(key);
|
||||||
|
let host: Host<u32> = Host::new(config);
|
||||||
|
assert!(host.client_url().starts_with("enode://101b3ef5a4ea7a1c7928e24c4c75fd053c235d7b80c22ae5c03d145d0ac7396e2a4ffff9adee3133a7b05044a5cee08115fd65145e5165d646bde371010d803c@"));
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user