mirror of
https://github.com/logos-blockchain/logos-execution-zone.git
synced 2026-07-25 23:23:11 +00:00
refactor: remove RpcRollingConfig
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
use std::time::Duration;
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
pub mod errors;
|
||||
@@ -7,21 +5,6 @@ pub mod message;
|
||||
pub mod parser;
|
||||
pub mod requests;
|
||||
|
||||
#[derive(Serialize, Deserialize, Clone, Copy, Debug)]
|
||||
pub struct RpcPollingConfig {
|
||||
pub polling_interval: Duration,
|
||||
pub polling_timeout: Duration,
|
||||
}
|
||||
|
||||
impl Default for RpcPollingConfig {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
polling_interval: Duration::from_millis(500),
|
||||
polling_timeout: Duration::from_secs(10),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Clone, Debug)]
|
||||
pub struct RpcLimitsConfig {
|
||||
/// Maximum byte size of the json payload.
|
||||
@@ -40,7 +23,6 @@ impl Default for RpcLimitsConfig {
|
||||
pub struct RpcConfig {
|
||||
pub addr: String,
|
||||
pub cors_allowed_origins: Vec<String>,
|
||||
pub polling_config: RpcPollingConfig,
|
||||
#[serde(default)]
|
||||
pub limits_config: RpcLimitsConfig,
|
||||
}
|
||||
@@ -50,7 +32,6 @@ impl Default for RpcConfig {
|
||||
RpcConfig {
|
||||
addr: "0.0.0.0:3040".to_owned(),
|
||||
cors_allowed_origins: vec!["*".to_owned()],
|
||||
polling_config: RpcPollingConfig::default(),
|
||||
limits_config: RpcLimitsConfig::default(),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user