This repository was archived by the owner on Jan 27, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,12 +11,15 @@ use crate::node::status_update::NodeStatusUpdater;
1111use crate :: store:: core:: RedisStore ;
1212use crate :: store:: core:: StoreContext ;
1313use crate :: utils:: loop_heartbeats:: LoopHeartbeats ;
14+ use alloy:: primitives:: U256 ;
1415use anyhow:: Result ;
1516use clap:: Parser ;
1617use log:: debug;
1718use log:: error;
19+ use log:: info;
1820use log:: LevelFilter ;
1921use shared:: web3:: contracts:: core:: builder:: ContractBuilder ;
22+ use shared:: web3:: contracts:: structs:: compute_pool:: PoolStatus ;
2023use shared:: web3:: wallet:: Wallet ;
2124use std:: sync:: Arc ;
2225use tokio:: task:: JoinSet ;
@@ -140,6 +143,22 @@ async fn main() -> Result<()> {
140143 . unwrap ( ) ,
141144 ) ;
142145
146+ match contracts
147+ . compute_pool
148+ . get_pool_info ( U256 :: from ( compute_pool_id) )
149+ . await
150+ {
151+ Ok ( pool) if pool. status == PoolStatus :: ACTIVE => Arc :: new ( pool) ,
152+ Ok ( _) => {
153+ info ! ( "Pool is not active. Exiting." ) ;
154+ return Ok ( ( ) ) ;
155+ }
156+ Err ( e) => {
157+ error ! ( "Failed to get pool info: {}" , e) ;
158+ return Ok ( ( ) ) ;
159+ }
160+ } ;
161+
143162 let discovery_store_context = store_context. clone ( ) ;
144163 let discovery_heartbeats = heartbeats. clone ( ) ;
145164 tasks. spawn ( async move {
You can’t perform that action at this time.
0 commit comments