mirror of
https://github.com/logos-blockchain/lssa.git
synced 2026-03-21 11:23:10 +00:00
feat: remove override_rust_log from wallet config
This commit is contained in:
parent
b631ef02c6
commit
325960d696
@ -1,6 +1,5 @@
|
||||
{
|
||||
"home": "/var/lib/sequencer_service",
|
||||
"override_rust_log": null,
|
||||
"genesis_id": 1,
|
||||
"is_genesis_random": true,
|
||||
"max_num_tx_in_block": 20,
|
||||
@ -8,7 +7,6 @@
|
||||
"mempool_max_size": 10000,
|
||||
"block_create_timeout": "10s",
|
||||
"retry_pending_blocks_timeout": "7s",
|
||||
"port": 3040,
|
||||
"bedrock_config": {
|
||||
"backoff": {
|
||||
"start_delay": "100ms",
|
||||
|
||||
@ -234,7 +234,6 @@ pub fn wallet_config(
|
||||
initial_data: &InitialData,
|
||||
) -> Result<WalletConfig> {
|
||||
Ok(WalletConfig {
|
||||
override_rust_log: None,
|
||||
sequencer_addr: addr_to_url(UrlProtocol::Http, sequencer_addr)
|
||||
.context("Failed to convert sequencer addr to URL")?,
|
||||
seq_poll_timeout: Duration::from_secs(30),
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
{
|
||||
"home": ".",
|
||||
"override_rust_log": null,
|
||||
"genesis_id": 1,
|
||||
"is_genesis_random": true,
|
||||
"max_num_tx_in_block": 20,
|
||||
@ -8,7 +7,6 @@
|
||||
"mempool_max_size": 1000,
|
||||
"block_create_timeout": "15s",
|
||||
"retry_pending_blocks_timeout": "5s",
|
||||
"port": 3040,
|
||||
"bedrock_config": {
|
||||
"backoff": {
|
||||
"start_delay": "100ms",
|
||||
|
||||
@ -1,13 +1,11 @@
|
||||
{
|
||||
"home": "/var/lib/sequencer_service",
|
||||
"override_rust_log": null,
|
||||
"genesis_id": 1,
|
||||
"is_genesis_random": true,
|
||||
"max_num_tx_in_block": 20,
|
||||
"max_block_size": "1 MiB",
|
||||
"mempool_max_size": 10000,
|
||||
"block_create_timeout": "10s",
|
||||
"port": 3040,
|
||||
"retry_pending_blocks_timeout": "7s",
|
||||
"bedrock_config": {
|
||||
"backoff": {
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
{
|
||||
"override_rust_log": null,
|
||||
"sequencer_addr": "http://127.0.0.1:3040",
|
||||
"seq_poll_timeout": "30s",
|
||||
"seq_tx_poll_max_blocks": 15,
|
||||
|
||||
@ -203,7 +203,6 @@ mod tests {
|
||||
|
||||
fn create_sample_wallet_config() -> WalletConfig {
|
||||
WalletConfig {
|
||||
override_rust_log: None,
|
||||
sequencer_addr: "http://127.0.0.1".parse().unwrap(),
|
||||
seq_poll_timeout: std::time::Duration::from_secs(12),
|
||||
seq_tx_poll_max_blocks: 5,
|
||||
|
||||
@ -37,15 +37,6 @@ impl WalletSubcommand for ConfigSubcommand {
|
||||
println!("{config_str}");
|
||||
} else if let Some(key) = key {
|
||||
match key.as_str() {
|
||||
"override_rust_log" => {
|
||||
if let Some(value) =
|
||||
&wallet_core.storage.wallet_config.override_rust_log
|
||||
{
|
||||
println!("{value}");
|
||||
} else {
|
||||
println!("Not set");
|
||||
}
|
||||
}
|
||||
"sequencer_addr" => {
|
||||
println!("{}", wallet_core.storage.wallet_config.sequencer_addr);
|
||||
}
|
||||
@ -88,9 +79,6 @@ impl WalletSubcommand for ConfigSubcommand {
|
||||
}
|
||||
Self::Set { key, value } => {
|
||||
match key.as_str() {
|
||||
"override_rust_log" => {
|
||||
wallet_core.storage.wallet_config.override_rust_log = Some(value);
|
||||
}
|
||||
"sequencer_addr" => {
|
||||
wallet_core.storage.wallet_config.sequencer_addr = value.parse()?;
|
||||
}
|
||||
|
||||
@ -187,9 +187,6 @@ pub struct GasConfig {
|
||||
#[optfield::optfield(pub WalletConfigOverrides, rewrap, attrs = (derive(Debug, Default, Clone)))]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct WalletConfig {
|
||||
/// Override rust log (env var logging level).
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub override_rust_log: Option<String>,
|
||||
/// Sequencer URL.
|
||||
pub sequencer_addr: Url,
|
||||
/// Sequencer polling duration for new blocks.
|
||||
@ -211,7 +208,6 @@ pub struct WalletConfig {
|
||||
impl Default for WalletConfig {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
override_rust_log: None,
|
||||
sequencer_addr: "http://127.0.0.1:3040".parse().unwrap(),
|
||||
seq_poll_timeout: Duration::from_secs(12),
|
||||
seq_tx_poll_max_blocks: 5,
|
||||
@ -308,7 +304,6 @@ impl WalletConfig {
|
||||
|
||||
pub fn apply_overrides(&mut self, overrides: WalletConfigOverrides) {
|
||||
let Self {
|
||||
override_rust_log,
|
||||
sequencer_addr,
|
||||
seq_poll_timeout,
|
||||
seq_tx_poll_max_blocks,
|
||||
@ -319,7 +314,6 @@ impl WalletConfig {
|
||||
} = self;
|
||||
|
||||
let WalletConfigOverrides {
|
||||
override_rust_log: o_override_rust_log,
|
||||
sequencer_addr: o_sequencer_addr,
|
||||
seq_poll_timeout: o_seq_poll_timeout,
|
||||
seq_tx_poll_max_blocks: o_seq_tx_poll_max_blocks,
|
||||
@ -329,10 +323,6 @@ impl WalletConfig {
|
||||
basic_auth: o_basic_auth,
|
||||
} = overrides;
|
||||
|
||||
if let Some(v) = o_override_rust_log {
|
||||
warn!("Overriding wallet config 'override_rust_log' to {v:#?}");
|
||||
*override_rust_log = v;
|
||||
}
|
||||
if let Some(v) = o_sequencer_addr {
|
||||
warn!("Overriding wallet config 'sequencer_addr' to {v}");
|
||||
*sequencer_addr = v;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user