Revert "Merge pull request #588 from logos-blockchain/schouhy/fix-indexer-programs"

This reverts commit d1637b65e2479e80bb617b900ec5d4024216457d, reversing
changes made to a58fbce2ff48c58b7bb5001b1a27e64b9596ee3a.
This commit is contained in:
Daniil Polyakov 2026-07-31 23:49:51 +03:00
parent e4112fc416
commit af1f502d87
5 changed files with 3 additions and 47 deletions

View File

@ -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?;

View File

@ -7,10 +7,6 @@ license = { workspace = true }
[lints]
workspace = true
[features]
default = []
testnet = []
[dependencies]
common.workspace = true
logos-blockchain-zone-sdk.workspace = true

View File

@ -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<Self> {
#[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()?;

View File

@ -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

View File

@ -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