Skip to content

Commit

Permalink
Update nft_ingester/src/api/dapi/change_logs.rs
Browse files Browse the repository at this point in the history
Co-authored-by: Kyrylo Stepanov <[email protected]>
  • Loading branch information
StanChe and kstepanovdev authored Jan 13, 2025
1 parent bf2e6b8 commit c67003d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions nft_ingester/src/api/dapi/change_logs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,12 @@ pub async fn get_proof_for_assets<
// Batch get cl_items
let cl_items_first_leaf = rocks_db.cl_items.batch_get(cl_item_keys.clone()).await?;

let last_seen_slot = rocks_db
.get_last_ingested_slot()
.await
.unwrap_or_default()
.unwrap_or_default();
let slot_for_cutoff = last_seen_slot.wrapping_sub(OFFSET_SLOTS);
let slot_for_cutoff = if let Ok(Some(last_seen_slot)) = rocks_db.get_last_ingested_slot().await
{
last_seen_slot.wrapping_sub(OFFSET_SLOTS)
} else {
0
};
// Build the leaves map directly by iterating over tree_pubkeys and the fetched items in parallel
let leaves: HashMap<Vec<u8>, (model::ClItemsModel, u64)> = tree_pubkeys
.into_iter()
Expand Down

0 comments on commit c67003d

Please sign in to comment.