Configure Gas Price Oracle with CLI arguments (#2664)

Co-authored-by: Aditya Pandey <aditya.p@Aditya-P.local>
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
Aditya Pandey
2023-05-15 15:16:05 +05:30
committed by GitHub
parent 599a5757d1
commit c190d0e69b
6 changed files with 114 additions and 7 deletions

View File

@ -46,3 +46,11 @@ impl Default for EthConfig {
}
}
}
impl EthConfig {
/// Configures the gas price oracle settings
pub fn with_gpo_config(mut self, gas_oracle_config: GasPriceOracleConfig) -> Self {
self.gas_oracle = gas_oracle_config;
self
}
}

View File

@ -349,6 +349,10 @@ impl RpcModuleConfig {
pub fn builder() -> RpcModuleConfigBuilder {
RpcModuleConfigBuilder::default()
}
/// Returns a new RPC module config given the eth namespace config
pub fn new(eth: EthConfig) -> Self {
Self { eth }
}
}
/// Configures [RpcModuleConfig]