Skip to content

Commit

Permalink
MTG-1245 Rollback some changes
Browse files Browse the repository at this point in the history
  • Loading branch information
andrii-kl committed Jan 24, 2025
1 parent a047068 commit 48ad6d6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
5 changes: 4 additions & 1 deletion nft_ingester/src/api/dapi/search_assets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ pub async fn search_assets<
>(
index_client: Arc<impl postgre_client::storage_traits::AssetPubkeyFilteredFetcher>,
rocks_db: Arc<Storage>,
filter: SearchAssetsQuery,
mut filter: SearchAssetsQuery,
sort_by: AssetSorting,
limit: u64,
page: Option<u64>,
Expand All @@ -55,6 +55,9 @@ pub async fn search_assets<
tree_gaps_checker: &Option<Arc<PPC>>,
native_mint_pubkey: &str,
) -> Result<AssetList, StorageError> {
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(
Expand Down
4 changes: 2 additions & 2 deletions nft_ingester/src/index_syncronizer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand All @@ -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
},
Expand Down
3 changes: 2 additions & 1 deletion nft_ingester/tests/api_tests.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#[cfg(test)]
// #[cfg(feature = "integration_tests")]

#[cfg(feature = "integration_tests")]
mod tests {
use std::{collections::HashMap, str::FromStr, sync::Arc};

Expand Down

0 comments on commit 48ad6d6

Please sign in to comment.