Optimized p2p connections.
Added a limit for 10 active connections to save bandwidth and CPU.
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
use std::time::Duration;
|
||||
|
||||
pub const DB_VERSION: u32 = 0;
|
||||
pub const CHAIN_VERSION: u32 = 0;
|
||||
|
||||
@@ -38,3 +40,8 @@ pub const ALFIS_DEBUG: &str = "ALFIS_DEBUG";
|
||||
pub const LISTEN_PORT: u16 = 4244;
|
||||
pub const UI_REFRESH_DELAY_MS: u128 = 250;
|
||||
pub const LOG_REFRESH_DELAY_SEC: u64 = 60;
|
||||
|
||||
pub const POLL_TIMEOUT: Option<Duration> = Some(Duration::from_millis(250));
|
||||
pub const MAX_PACKET_SIZE: usize = 1 * 1024 * 1024; // 1 Mb
|
||||
pub const MAX_READ_BLOCK_TIME: u128 = 500;
|
||||
pub const MAX_NODES: usize = 10;
|
||||
|
||||
Reference in New Issue
Block a user