diff --git a/common/src/config.rs b/common/src/config.rs index a76d416..91e456f 100644 --- a/common/src/config.rs +++ b/common/src/config.rs @@ -12,6 +12,10 @@ use crate::{ }, }; +pub fn default_true() -> bool { + true +} + #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(deny_unknown_fields)] pub struct ConfigQuicPlugin { @@ -26,13 +30,13 @@ pub struct ConfigQuicPlugin { pub compression_parameters: CompressionParameters, #[serde(default = "ConfigQuicPlugin::default_number_of_retries")] pub number_of_retries: u64, - #[serde(default = "ConfigQuicPlugin::default_allow_accounts")] + #[serde(default = "default_true")] pub allow_accounts: bool, #[serde(default)] pub allow_accounts_at_startup: bool, - #[serde(default = "ConfigQuicPlugin::default_enable_block_builder")] + #[serde(default = "default_true")] pub enable_block_builder: bool, - #[serde(default)] + #[serde(default = "default_true")] pub build_blocks_with_accounts: bool, } @@ -48,14 +52,6 @@ impl ConfigQuicPlugin { fn default_log_level() -> String { "info".to_string() } - - fn default_allow_accounts() -> bool { - true - } - - fn default_enable_block_builder() -> bool { - true - } } #[derive(Debug, Clone, Serialize, Deserialize, Copy)] diff --git a/common/src/defaults.rs b/common/src/defaults.rs index b2a26cb..22213f4 100644 --- a/common/src/defaults.rs +++ b/common/src/defaults.rs @@ -3,11 +3,11 @@ pub const DEFAULT_MAX_RECIEVE_WINDOW_SIZE: u64 = 24 * 1024 * 1024; // 24 MBs pub const DEFAULT_CONNECTION_TIMEOUT: u64 = 10; pub const DEFAULT_MAX_NB_CONNECTIONS: u64 = 10; pub const DEFAULT_MAX_ACK_DELAY: u64 = 25; -pub const DEFAULT_ACK_EXPONENT: u64 = 2; +pub const DEFAULT_ACK_EXPONENT: u64 = 3; pub const ALPN_GEYSER_PROTOCOL_ID: &[u8] = b"geyser"; pub const MAX_DATAGRAM_SIZE: usize = 1350; pub const MAX_PAYLOAD_BUFFER: usize = 5 * MAX_DATAGRAM_SIZE; pub const DEFAULT_ENABLE_PACING: bool = true; -pub const DEFAULT_USE_CC_BBR: bool = false; -pub const DEFAULT_INCREMENTAL_PRIORITY: bool = false; +pub const DEFAULT_USE_CC_BBR: bool = true; +pub const DEFAULT_INCREMENTAL_PRIORITY: bool = true; pub const DEFAULT_ENABLE_GSO: bool = true;