Skip to content
This repository was archived by the owner on Jan 27, 2026. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions orchestrator/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,15 @@ use crate::node::status_update::NodeStatusUpdater;
use crate::store::core::RedisStore;
use crate::store::core::StoreContext;
use crate::utils::loop_heartbeats::LoopHeartbeats;
use alloy::primitives::U256;
use anyhow::Result;
use clap::Parser;
use log::debug;
use log::error;
use log::info;
use log::LevelFilter;
use shared::web3::contracts::core::builder::ContractBuilder;
use shared::web3::contracts::structs::compute_pool::PoolStatus;
use shared::web3::wallet::Wallet;
use std::sync::Arc;
use tokio::task::JoinSet;
Expand Down Expand Up @@ -140,6 +143,22 @@ async fn main() -> Result<()> {
.unwrap(),
);

match contracts
.compute_pool
.get_pool_info(U256::from(compute_pool_id))
.await
{
Ok(pool) if pool.status == PoolStatus::ACTIVE => Arc::new(pool),
Ok(_) => {
info!("Pool is not active. Exiting.");
return Ok(());
}
Err(e) => {
error!("Failed to get pool info: {}", e);
return Ok(());
}
};

let discovery_store_context = store_context.clone();
let discovery_heartbeats = heartbeats.clone();
tasks.spawn(async move {
Expand Down