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

fix: don't make keypool refill spam progress bars #5851

Merged
merged 1 commit into from
Jan 31, 2024

Conversation

panleone
Copy link

@panleone panleone commented Jan 30, 2024

Issue being fixed or feature implemented

Trivial bug: keypoolrefill internally updates the status of the progress bar each second.

m_storage.UpdateProgress(strMsg, static_cast<int>(dProgress));

However it can happen that one second is not enough time to make significant progress and
static_cast<int>(dProgress) = 0.
Calling the function with 0 as progress opens a new progress bar and this led to problems like #5730

What was done?

trivially make sure to update the progress only if the parameter is >0

How Has This Been Tested?

rpc does not spam anymore

Checklist:

Go over all the following points, and put an x in all the boxes that apply.

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation
  • I have assigned this pull request to a milestone (for repository code-owners and collaborators only)

Update the progress status only if there has been an actual progress
@UdjinM6 UdjinM6 added this to the 20.1 milestone Jan 30, 2024
@kxcd
Copy link

kxcd commented Jan 30, 2024

This bug impacted me when generating a large quantity of keys, eg 1,000,000.

Copy link

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

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

Nice find! 👍 ACK

Copy link
Member

@PastaPastaPasta PastaPastaPasta left a comment

Choose a reason for hiding this comment

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

utACK for squash merge

@PastaPastaPasta PastaPastaPasta merged commit 2238e03 into dashpay:develop Jan 31, 2024
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants