Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/rs-sdk/src/platform/address_sync/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ pub async fn sync_address_balances<P: AddressProvider>(

// Step 1: Execute trunk query
let (trunk_result, checkpoint_height) = execute_trunk_query(sdk, &mut result.metrics).await?;
result.checkpoint_height = checkpoint_height;

trace!(
"Trunk query returned {} elements, {} leaf_keys",
Expand Down
7 changes: 7 additions & 0 deletions packages/rs-sdk/src/platform/address_sync/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@ pub struct AddressSyncResult {

/// Metrics about the sync process.
pub metrics: AddressSyncMetrics,

/// The checkpoint height at which balances were synced.
///
/// This is the block height from which terminal balance updates should start
/// to catch any changes that occurred after the checkpoint.
pub checkpoint_height: u64,
}

impl AddressSyncResult {
Expand All @@ -84,6 +90,7 @@ impl AddressSyncResult {
absent: BTreeSet::new(),
highest_found_index: None,
metrics: AddressSyncMetrics::default(),
checkpoint_height: 0,
}
}

Expand Down
Loading