File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
crates/rust-client/src/sync Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,11 @@ impl<AUTH> Client<AUTH> {
3939 Ok ( genesis_block)
4040 }
4141
42+ /// Fetches from the store the current view of the chain's [`PartialMmr`].
43+ pub async fn get_current_partial_mmr ( & self ) -> Result < PartialMmr , ClientError > {
44+ self . store . get_current_partial_mmr ( ) . await . map_err ( Into :: into)
45+ }
46+
4247 // HELPERS
4348 // --------------------------------------------------------------------------------------------
4449
Original file line number Diff line number Diff line change @@ -65,6 +65,7 @@ pub trait OnNoteReceived {
6565///
6666/// When created it receives a callback that will be executed when a new note inclusion is received
6767/// in the sync response.
68+ #[ derive( Clone ) ]
6869pub struct StateSync {
6970 /// The RPC client used to communicate with the node.
7071 rpc_api : Arc < dyn NodeRpcClient > ,
@@ -123,7 +124,7 @@ impl StateSync {
123124 /// * `unspent_input_notes` - The current state of unspent input notes tracked by the client.
124125 /// * `unspent_output_notes` - The current state of unspent output notes tracked by the client.
125126 pub async fn sync_state (
126- self ,
127+ & self ,
127128 mut current_partial_mmr : PartialMmr ,
128129 accounts : Vec < AccountHeader > ,
129130 note_tags : BTreeSet < NoteTag > ,
You can’t perform that action at this time.
0 commit comments