File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed
packages/rs-sdk/src/platform/address_sync Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -115,6 +115,7 @@ pub async fn sync_address_balances<P: AddressProvider>(
115115
116116 // Step 1: Execute trunk query
117117 let ( trunk_result, checkpoint_height) = execute_trunk_query ( sdk, & mut result. metrics ) . await ?;
118+ result. checkpoint_height = checkpoint_height;
118119
119120 trace ! (
120121 "Trunk query returned {} elements, {} leaf_keys" ,
Original file line number Diff line number Diff line change @@ -74,6 +74,12 @@ pub struct AddressSyncResult {
7474
7575 /// Metrics about the sync process.
7676 pub metrics : AddressSyncMetrics ,
77+
78+ /// The checkpoint height at which balances were synced.
79+ ///
80+ /// This is the block height from which terminal balance updates should start
81+ /// to catch any changes that occurred after the checkpoint.
82+ pub checkpoint_height : u64 ,
7783}
7884
7985impl AddressSyncResult {
@@ -84,6 +90,7 @@ impl AddressSyncResult {
8490 absent : BTreeSet :: new ( ) ,
8591 highest_found_index : None ,
8692 metrics : AddressSyncMetrics :: default ( ) ,
93+ checkpoint_height : 0 ,
8794 }
8895 }
8996
You can’t perform that action at this time.
0 commit comments