unigrid-project / janus-java

Frontend and wallet for the Unigrid network powered by JavaFX and Weld (CDI). Primarily developed to be used with the UNIGRID legacy daemon, Cosmos chain and Hedgehog network, but has a portable design.
https://www.unigrid.org
GNU Affero General Public License v3.0
1 stars 4 forks source link

Janus should wait for gnsyc #172

Closed dekm closed 9 months ago

dekm commented 1 year ago

You cannot start gridnodes until the list has finished syncing. We should add a check to wait for this before the button to start is available.

CGridnodeSync::GetNextAsset - Sync has finished

https://github.com/unigrid-project/daemon/blob/master/daemon/gridnode-sync.cpp#L159

We could add this to one of the rpc calls so it returns it.

GridnodeSync.RequestedGridnodeAssets

#define GRIDNODE_SYNC_INITIAL 0
#define GRIDNODE_SYNC_SPORKS 1
#define GRIDNODE_SYNC_LIST 2
#define GRIDNODE_SYNC_MNW 3
#define GRIDNODE_SYNC_BUDGET 4
#define GRIDNODE_SYNC_BUDGET_PROP 10
#define GRIDNODE_SYNC_BUDGET_FIN 11
#define GRIDNODE_SYNC_FAILED 998
#define GRIDNODE_SYNC_FINISHED 999

#define GRIDNODE_SYNC_TIMEOUT 5
#define GRIDNODE_SYNC_THRESHOLD 2

Then in Janus do a check if == 999

github-actions[bot] commented 10 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

github-actions[bot] commented 9 months ago

This issue has been closed due to inactivity.