Skip to content

Commit

Permalink
Merge branch 'rooch-network:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
nlyrthiia authored Sep 19, 2024
2 parents 848136b + 2d65e2e commit 3816ebe
Show file tree
Hide file tree
Showing 25 changed files with 5,937 additions and 5,830 deletions.
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
legacy-peer-deps = false
auto-install-peers=true
strict-peer-dependencies=false
loglevel=error
44 changes: 22 additions & 22 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,11 @@ rooch-nursery = { path = "frameworks/rooch-nursery" }
# External crate dependencies.
# Please do not add any test features here: they should be declared by the individual crate.
again = "0.1.2"
anyhow = "1.0.87"
anyhow = "1.0.89"
async-trait = "0"
backtrace = "0.3"
bcs = "0.1.3"
bytes = "1.7.1"
bytes = "1.7.2"
bech32 = "0.11.0"
better_any = "0.1.1"
bitcoin = { version = "0.32.2", features = ["rand-std", "bitcoinconsensus"] }
Expand Down Expand Up @@ -339,7 +339,7 @@ function_name = { version = "0.3.0" }
rustc-hash = { version = "2.0.0" }
xorf = { version = "0.11.0" }
vergen-git2 = { version = "1.0.0", features = ["build", "cargo", "rustc"] }
vergen-pretty = "0.3.4"
vergen-pretty = "0.3.5"
crossbeam-channel = "0.5.13"

# Note: the BEGIN and END comments below are required for external tooling. Do not remove.
Expand Down
17 changes: 10 additions & 7 deletions crates/rooch-config/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Copyright (c) RoochNetwork
// SPDX-License-Identifier: Apache-2.0

use crate::da_config::DAConfig;
use crate::store_config::StoreConfig;
use anyhow::Result;
use clap::Parser;
use moveos_config::{temp_dir, DataDirPath};
Expand All @@ -9,15 +11,13 @@ use rooch_types::crypto::RoochKeyPair;
use rooch_types::genesis_config::GenesisConfig;
use rooch_types::rooch_network::{BuiltinChainID, RoochChainID, RoochNetwork};
use rooch_types::service_status::ServiceStatus;
use rooch_types::service_type::ServiceType;
use serde::{Deserialize, Serialize};
use std::fs::create_dir_all;
use std::str::FromStr;
use std::sync::Arc;
use std::{fmt::Debug, path::Path, path::PathBuf};

use crate::da_config::DAConfig;
use crate::store_config::StoreConfig;

pub mod config;
pub mod da_config;
pub mod server_config;
Expand Down Expand Up @@ -141,6 +141,9 @@ pub struct RoochOpt {
#[clap(long)]
pub traffic_per_second: Option<u64>,

#[clap(long, default_value_t, value_enum)]
pub service_type: ServiceType,

#[serde(skip)]
#[clap(skip)]
base: Option<Arc<BaseConfig>>,
Expand Down Expand Up @@ -177,6 +180,7 @@ impl RoochOpt {
traffic_per_second: None,
traffic_burst_size: None,
base: None,
service_type: ServiceType::default(),
};
opt.init()?;
Ok(opt)
Expand Down Expand Up @@ -356,9 +360,8 @@ impl ServerOpt {
}

pub fn get_active_env(&self) -> String {
match self.active_env.clone() {
Some(env) => env,
None => RoochChainID::default().chain_name(),
}
self.active_env
.clone()
.unwrap_or_else(|| RoochChainID::default().chain_name())
}
}
Loading

0 comments on commit 3816ebe

Please sign in to comment.