atomicDEX-API icon indicating copy to clipboard operation
atomicDEX-API copied to clipboard

stop sending sync status after first/main sync status is finished

Open borngraced opened this issue 2 years ago • 0 comments

https://github.com/KomodoPlatform/komodo-defi-framework/blob/84be05969b2247e9f24ee343dd50f3419838309c/mm2src/coins/z_coin/z_rpc.rs#L743-L753 SaplingSyncLoopHandle keeps sending sync status after main sync process is finished which results to error like

7 10:57:53, common::log:305] DEBUG z_rpc:679] No one seems interested in SyncStatus: send failed because channel is full

We need to figure out a method to stop sending updates after the main/first synchronization process. One way to achieve this is by introducing a new field called main_sync_state_finished to the SaplingSyncLoopHandle. This field would act as a marker to signal when the main synchronization is completed. Before sending any new updates, we can check the value of main_sync_state_finished to ensure that the main synchronization has indeed finished.

same issue goes for https://github.com/KomodoPlatform/komodo-defi-framework/blob/84be05969b2247e9f24ee343dd50f3419838309c/mm2src/coins/utxo.rs#L457-L490

cc @shamardy

borngraced avatar Dec 07 '23 12:12 borngraced