building blocks with accounts, changing defaults

This commit is contained in:
godmodegalactus 2024-09-23 13:02:35 +02:00
parent 42b321eac7
commit 1752a17189
No known key found for this signature in database
GPG Key ID: 22DA4A30887FDA3C
2 changed files with 10 additions and 14 deletions

View File

@ -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)]

View File

@ -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;