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 skipping of static rewards #3110

Merged
merged 1 commit into from
Nov 5, 2024
Merged

Fix skipping of static rewards #3110

merged 1 commit into from
Nov 5, 2024

Conversation

Bushstar
Copy link
Member

@Bushstar Bushstar commented Nov 5, 2024

Summary

  • Fix skipping of static rewards when consolidating rewards.
  • Flush DB after consolidating rewards.
  • Fix consolidate rewards test.
  • Always set skip static when consolidating rewards, we never want them.
  • Remove passing of workers as this is always from RewardConsolidationWorkersCount() which is called internally anyway.

Implications

  • Storage

    • Database reindex required
    • Database reindex optional
    • Database reindex not required
    • None
  • Consensus

    • Network upgrade required
    • Includes backward compatible changes
    • Includes consensus workarounds
    • Includes consensus refactors
    • None

@prasannavl prasannavl merged commit 2af7598 into master Nov 5, 2024
13 of 14 checks passed
@prasannavl prasannavl deleted the bush/skipstatic-fix branch November 5, 2024 08:51
@@ -936,7 +936,6 @@ void ConsolidateRewards(CCustomCSView &view,
int height,
const std::unordered_set<CScript, CScriptHasher> &owners,
bool interruptOnShutdown,
int numWorkers = 0,
bool skipStatic = false);
Copy link
Contributor

Choose a reason for hiding this comment

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

to prevent further default-value bugs and increase clarity: why not remove the default and have an explicit false on the calls?

@prasannavl
Copy link
Member

Missed the comment above. Agree that default values are best avoided - usually not worth the cost of difficult to catch errors.

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.

3 participants