From af1f502d8756e413b0f46ad04474ea9a58d669aa Mon Sep 17 00:00:00 2001 From: Daniil Polyakov Date: Fri, 31 Jul 2026 23:49:51 +0300 Subject: [PATCH] Revert "Merge pull request #588 from logos-blockchain/schouhy/fix-indexer-programs" This reverts commit d1637b65e2479e80bb617b900ec5d4024216457d, reversing changes made to a58fbce2ff48c58b7bb5001b1a27e64b9596ee3a. --- integration_tests/tests/pinata.rs | 37 +---------------------------- lez/indexer/core/Cargo.toml | 4 ---- lez/indexer/core/src/block_store.rs | 5 ---- lez/indexer/ffi/Cargo.toml | 2 +- lez/indexer/service/Cargo.toml | 2 +- 5 files changed, 3 insertions(+), 47 deletions(-) diff --git a/integration_tests/tests/pinata.rs b/integration_tests/tests/pinata.rs index 0c17e40f..fa4c3d98 100644 --- a/integration_tests/tests/pinata.rs +++ b/integration_tests/tests/pinata.rs @@ -9,7 +9,7 @@ use std::time::Duration; use anyhow::{Context as _, Result}; use integration_tests::{ TIME_TO_WAIT_FOR_BLOCK_SECONDS, TestContext, private_mention, public_mention, - verify_commitment_is_in_state, wait_for_indexer_to_catch_up, + verify_commitment_is_in_state, }; use log::info; use sequencer_service_rpc::RpcClient as _; @@ -164,41 +164,6 @@ async fn claim_pinata_to_existing_public_account() -> Result<()> { Ok(()) } -#[test] -async fn claim_pinata_indexer_keeps_up() -> Result<()> { - let mut ctx = TestContext::new().await?; - - let command = Command::Pinata(PinataProgramAgnosticSubcommand::Claim { - to: public_mention(ctx.existing_public_accounts()[0]), - }); - - wallet::cli::execute_subcommand(ctx.wallet_mut(), command).await?; - - info!("Waiting for next block creation"); - tokio::time::sleep(Duration::from_secs(TIME_TO_WAIT_FOR_BLOCK_SECONDS)).await; - - info!("Waiting for indexer to parse blocks"); - wait_for_indexer_to_catch_up(&ctx).await?; - - let winner_ind_state = indexer_service_rpc::RpcClient::get_account( - &**ctx.indexer_client(), - ctx.existing_public_accounts()[0].into(), - ) - .await - .unwrap(); - let winner_seq_state = sequencer_service_rpc::RpcClient::get_account( - ctx.sequencer_client(), - ctx.existing_public_accounts()[0], - ) - .await?; - - assert_eq!(winner_ind_state, winner_seq_state.into()); - - info!("Indexer correctly indexed the pinata claim"); - - Ok(()) -} - #[test] async fn claim_pinata_to_existing_private_account() -> Result<()> { let mut ctx = TestContext::new().await?; diff --git a/lez/indexer/core/Cargo.toml b/lez/indexer/core/Cargo.toml index 2ae2d9c0..758acdd6 100644 --- a/lez/indexer/core/Cargo.toml +++ b/lez/indexer/core/Cargo.toml @@ -7,10 +7,6 @@ license = { workspace = true } [lints] workspace = true -[features] -default = [] -testnet = [] - [dependencies] common.workspace = true logos-blockchain-zone-sdk.workspace = true diff --git a/lez/indexer/core/src/block_store.rs b/lez/indexer/core/src/block_store.rs index 9d17109c..f00c94c5 100644 --- a/lez/indexer/core/src/block_store.rs +++ b/lez/indexer/core/src/block_store.rs @@ -23,12 +23,7 @@ impl IndexerStore { /// Starting database at the start of new chain. /// Creates files if necessary. pub fn open_db(location: &Path) -> Result { - #[cfg(not(feature = "testnet"))] let initial_state = testnet_initial_state::initial_state(); - - #[cfg(feature = "testnet")] - let initial_state = testnet_initial_state::initial_state_testnet(); - let dbio = RocksDBIO::open_or_create(location, &initial_state)?; let current_state = dbio.final_state()?; diff --git a/lez/indexer/ffi/Cargo.toml b/lez/indexer/ffi/Cargo.toml index 6b74ab8b..a1615b75 100644 --- a/lez/indexer/ffi/Cargo.toml +++ b/lez/indexer/ffi/Cargo.toml @@ -6,7 +6,7 @@ version = "0.1.0" [dependencies] lee.workspace = true -indexer_core = { workspace = true, features = ["testnet"] } +indexer_core.workspace = true indexer_service_protocol = { workspace = true, features = ["convert"] } env_logger.workspace = true diff --git a/lez/indexer/service/Cargo.toml b/lez/indexer/service/Cargo.toml index 44ab7068..a07a2285 100644 --- a/lez/indexer/service/Cargo.toml +++ b/lez/indexer/service/Cargo.toml @@ -10,7 +10,7 @@ workspace = true [dependencies] indexer_service_protocol = { workspace = true, features = ["convert"] } indexer_service_rpc = { workspace = true, features = ["server"] } -indexer_core = { workspace = true, features = ["testnet"] } +indexer_core.workspace = true clap = { workspace = true, features = ["derive"] } anyhow.workspace = true