Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
0xmovses committed Feb 12, 2024
1 parent a580994 commit a473901
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 13 deletions.
3 changes: 3 additions & 0 deletions m1/Cargo.lock

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

3 changes: 3 additions & 0 deletions m1/simulator/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ edition = "2021"
[dependencies]
avalanche-installer = "0.0.77"
avalanche-network-runner-sdk = "0.3.3" # https://crates.io/crates/avalanche-network-runner-sdk
log = "0.4.19"
random-manager = "0.0.5"
serde_json = "1.0.108" # https://github.com/serde-rs/json/releases
avalanche-types = { workspace = true } # https://crates.io/crates/avalanche-types
aptos-sdk = {workspace = true }
anyhow = { workspace = true }
Expand Down
26 changes: 14 additions & 12 deletions m1/simulator/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,29 +75,31 @@ pub enum SubCommands{
Health(HealthCommand),
}

fn main() {
#[tokio::main]
async fn main() {
let cli = Cli::parse();
match cli.command {
SubCommands::Start(opts) => start_network(opts),
SubCommands::Partition(opts) => partition_network(opts),
SubCommands::Reconnect(opts) => reconnect_validators(opts),
SubCommands::Health(opts) => network_health(opts),
SubCommands::Start(opts) => start_network(opts).await,
SubCommands::Partition(opts) => partition_network(opts).await,
SubCommands::Reconnect(opts) => reconnect_validators(opts).await,
SubCommands::Health(opts) => network_health(opts).await,
}
}

fn start_network(opts: StartCommand) {
simulator::init_m1_network()
async fn start_network(opts: StartCommand) {
simulator::init_m1_network().await;

}

fn partition_network(opts: PartitionCommand) {

async fn partition_network(opts: PartitionCommand) {
todo!()
}

fn reconnect_validators(opts: ReconnectCommand) {
async fn reconnect_validators(opts: ReconnectCommand) {
todo!()

}

fn network_health(opts: HealthCommand) {

async fn network_health(opts: HealthCommand) {
todo!()
}
2 changes: 1 addition & 1 deletion m1/tests/e2e/src/tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ const AVALANCHEGO_VERSION: &str = "v1.10.9";

#[tokio::test]
async fn e2e() {
init_m1_network()
init_m1_network().await
}

0 comments on commit a473901

Please sign in to comment.