Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refresh cache more often in GUI while wallet or blockchain is syncing #1421

Conversation

jp1ac4
Copy link
Collaborator

@jp1ac4 jp1ac4 commented Nov 1, 2024

This is to resolve #1414.

In the end, I felt it was simple enough to include commits that cover both parts of #1414 (the short-term change and the follow-up).

I start with the short-term change (setting the refresh interval ignoring the last poll logic) and then follow with commits that cover all syncing statuses.

I don't use as high a refresh frequency for a remote backend as for a local backend, but these values can be easily changed if required.

This will make it easier to reuse elsewhere.
Refresh the cache more often while the wallet has a syncing
status of some kind in order to detect sooner that this has
finished.

This does not cover syncing scenarios that require the first poll
to be detected since we don't currently store the required info
(the last poll at startup). This should be covered in a follow-up.
// If external daemon, we cannot be sure it will return last poll as it
// depends on the version, so assume it won't unless the last poll at
// startup is set.
// TODO: should we check the daemon version at GUI startup?
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

iirc we assume an user always run a daemon w/ same version as the GUI?
Maybe we should just add a sanity check for this in a separate PR?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll create an issue for that.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be tracked in #1429.

@pythcoiner
Copy link
Collaborator

tACK 918909d
tested w/ a local eletrum backend, it's way better than waiting 10 secs!

@edouardparis edouardparis merged commit b6e50e5 into wizardsardine:master Nov 4, 2024
30 of 31 checks passed
@jp1ac4 jp1ac4 deleted the gui-refresh-cache-more-often-for-new-wallet branch November 6, 2024 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Refresh cache more often in GUI while wallet is syncing
4 participants