fix: notify sim-mode in kns_indexer and app_store

This commit is contained in:
dr-frmr 2024-05-01 22:31:55 +09:00
parent aa2526a6dc
commit 38bc1c2f7b
No known key found for this signature in database
2 changed files with 6 additions and 0 deletions

View File

@ -156,7 +156,10 @@ fn init(our: Address) {
state = State::new(CONTRACT_ADDRESS.to_string()).unwrap(); state = State::new(CONTRACT_ADDRESS.to_string()).unwrap();
} }
#[cfg(not(feature = "simulation-mode"))]
println!("indexing on contract address {}", state.contract_address); println!("indexing on contract address {}", state.contract_address);
#[cfg(feature = "simulation-mode")]
println!("simulation mode: not indexing packages");
// create new provider for sepolia with request-timeout of 60s // create new provider for sepolia with request-timeout of 60s
// can change, log requests can take quite a long time. // can change, log requests can take quite a long time.

View File

@ -120,7 +120,10 @@ call_init!(init);
fn init(our: Address) { fn init(our: Address) {
let (chain_id, contract_address) = (10, KNS_OPTIMISM_ADDRESS.to_string()); let (chain_id, contract_address) = (10, KNS_OPTIMISM_ADDRESS.to_string());
#[cfg(not(feature = "simulation-mode"))]
println!("indexing on contract address {}", contract_address); println!("indexing on contract address {}", contract_address);
#[cfg(feature = "simulation-mode")]
println!("simulation mode: not indexing KNS");
// if we have state, load it in // if we have state, load it in
let state: State = match get_typed_state(|bytes| Ok(bincode::deserialize::<State>(bytes)?)) { let state: State = match get_typed_state(|bytes| Ok(bincode::deserialize::<State>(bytes)?)) {