From 48ad6d6fa03b21a6e4b2d12d8a678879c2618837 Mon Sep 17 00:00:00 2001 From: andrii_kl <18900364+andrii-kl@users.noreply.github.com> Date: Fri, 24 Jan 2025 19:54:46 +0100 Subject: [PATCH] MTG-1245 Rollback some changes --- nft_ingester/src/api/dapi/search_assets.rs | 5 ++++- nft_ingester/src/index_syncronizer.rs | 4 ++-- nft_ingester/tests/api_tests.rs | 3 ++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/nft_ingester/src/api/dapi/search_assets.rs b/nft_ingester/src/api/dapi/search_assets.rs index b51e7cec..7e4fa8d3 100644 --- a/nft_ingester/src/api/dapi/search_assets.rs +++ b/nft_ingester/src/api/dapi/search_assets.rs @@ -36,7 +36,7 @@ pub async fn search_assets< >( index_client: Arc, rocks_db: Arc, - filter: SearchAssetsQuery, + mut filter: SearchAssetsQuery, sort_by: AssetSorting, limit: u64, page: Option, @@ -55,6 +55,9 @@ pub async fn search_assets< tree_gaps_checker: &Option>, native_mint_pubkey: &str, ) -> Result { + if options.show_fungible { + filter.token_type = Some(TokenType::All) + } let show_native_balance = options.show_native_balance; let (asset_list, native_balance) = tokio::join!( fetch_assets( diff --git a/nft_ingester/src/index_syncronizer.rs b/nft_ingester/src/index_syncronizer.rs index 8dd6b886..7fe7c6cd 100644 --- a/nft_ingester/src/index_syncronizer.rs +++ b/nft_ingester/src/index_syncronizer.rs @@ -195,7 +195,7 @@ where let state = self.get_sync_state(run_full_sync_threshold, asset_type).await?; match state { SyncStatus::FullSyncRequired(state) => { - tracing::debug!("Should run dump synchronizer as the difference between last indexed and last known sequence is greater than the threshold. Last indexed: {:?}, Last known: {}", state.last_indexed_key.clone().map(|k|k.seq), state.last_known_key.seq); + tracing::warn!("Should run dump synchronizer as the difference between last indexed and last known sequence is greater than the threshold. Last indexed: {:?}, Last known: {}", state.last_indexed_key.clone().map(|k|k.seq), state.last_known_key.seq); self.regular_nft_syncronize(rx, state.last_indexed_key, state.last_known_key).await }, SyncStatus::RegularSyncRequired(state) => { @@ -220,7 +220,7 @@ where match state { SyncStatus::FullSyncRequired(state) => { - tracing::debug!("Should run dump synchronizer as the difference between last indexed and last known sequence is greater than the threshold. Last indexed: {:?}, Last known: {}", state.last_indexed_key.clone().map(|k|k.seq), state.last_known_key.seq); + tracing::warn!("Should run dump synchronizer as the difference between last indexed and last known sequence is greater than the threshold. Last indexed: {:?}, Last known: {}", state.last_indexed_key.clone().map(|k|k.seq), state.last_known_key.seq); self.regular_fungible_syncronize(rx, state.last_indexed_key, state.last_known_key) .await }, diff --git a/nft_ingester/tests/api_tests.rs b/nft_ingester/tests/api_tests.rs index 45038ac8..66c2e6e2 100644 --- a/nft_ingester/tests/api_tests.rs +++ b/nft_ingester/tests/api_tests.rs @@ -1,5 +1,6 @@ #[cfg(test)] -// #[cfg(feature = "integration_tests")] + +#[cfg(feature = "integration_tests")] mod tests { use std::{collections::HashMap, str::FromStr, sync::Arc};