"No connection" shown while syncing #54

Closed
opened 3 years ago by duke · 4 comments
duke commented 3 years ago
Owner

Some users get confused that they see "No connection" while SDL is syncing, which is very reasonable. It's not actually correct, there is a connection, but syncing is not finished. Instead of updating that text when syncing is complete, it should be updated at the beginning of syncing.

This does not affect new users much, since syncing is just a few seconds. But users with old wallets that haven't been started in a while may need to sync for many minutes, and then it's very much confusing.

Some users get confused that they see "No connection" while SDL is syncing, which is very reasonable. It's not actually correct, there is a connection, but syncing is not finished. Instead of updating that text when syncing is complete, it should be updated at the beginning of syncing. This does not affect new users much, since syncing is just a few seconds. But users with old wallets that haven't been started in a while may need to sync for many minutes, and then it's very much confusing.
Poster
Owner

Since the latest SDL released binaries have an old block height checkpoint, most new users will see this confusing text until they are synced. We should try to fix this in our next release.

Since the latest SDL released binaries have an old block height checkpoint, most new users will see this confusing text until they are synced. We should try to fix this in our next release.
Collaborator

I was looking into this now and it's because many RPCs/functions have this:

if (!zrpc->haveConnection()) 
    return noConnection();

noConnection displays "No connection" in bottom left and right status areas. The main culprits of this during a fresh sync are refresh and refreshHUSHPrice because both have timers that start immediately. refresh uses updateSpeed and is called every 30 secs. refreshHUSHPrice uses priceRefreshSpeed and is updated every 5 mins.

The simple fix is to return without calling noConnection for both refresh functions when there is no connection. More ideal to not start those timers until after syncing is done but timers are currently private.

I was looking into this now and it's because many RPCs/functions have this: ``` if (!zrpc->haveConnection()) return noConnection(); ``` `noConnection` displays "No connection" in bottom left and right status areas. The main culprits of this during a fresh sync are `refresh` and `refreshHUSHPrice` because both have timers that start immediately. `refresh` uses `updateSpeed` and is called every 30 secs. `refreshHUSHPrice` uses `priceRefreshSpeed` and is updated every 5 mins. The simple fix is to return without calling `noConnection` for both refresh functions when there is no connection. More ideal to not start those timers until after syncing is done but timers are currently private.
Collaborator

I did simple fix of just returning but may need to revisit and handle timers accordingly:
e179e723f5

Possible other functions get called that may end up displaying "No connection" but I was only seeing refresh and refreshHUSHPrice on a fresh sync.

I did simple fix of just returning but may need to revisit and handle timers accordingly: https://git.hush.is/hush/SilentDragonLite/commit/e179e723f5d6243e74a432273da7ea73893fe174 Possible other functions get called that may end up displaying "No connection" but I was only seeing `refresh` and `refreshHUSHPrice` on a fresh sync.
Poster
Owner

@fekt thanks, this confuses users all the time. Much better now. Gonna close this, if we see other things showing "No connection" we can make another issue.

@fekt thanks, this confuses users all the time. Much better now. Gonna close this, if we see other things showing "No connection" we can make another issue.
duke closed this issue 2 years ago
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.