Skip to content

Conversation

@random-zebra
Copy link

Fix a bug Introduced in #1826, which makes the node erase all proposals and finalized budgets, after reading them from the DB during startup (and thus having to ask everything again from the peers).

Cause:
The budget manager best height is set after reading the budgetdb.
As non-dry runs of CBudgetDB::Read include a call to CheckAndRemove() at the end (to delete expired objects), the manager's best-height needs to be already set.

Otherwise all proposals/budgets are removed by `CheckAndRemove`
(negative confirmations for collateral txes).

Introduced in PIVX-Project#1826
@random-zebra random-zebra added Bug Budget/Proposal System Startup Wallet startup changes and/or improvements labels Oct 2, 2020
@random-zebra random-zebra added this to the 5.0.0 milestone Oct 2, 2020
@random-zebra random-zebra self-assigned this Oct 2, 2020
@random-zebra random-zebra added the Needs Backport Placeholder tag for anything needing a backport to prior version branches label Oct 2, 2020
Copy link

@furszy furszy left a comment

Choose a reason for hiding this comment

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

Good catch, ACK 683fd6b.
The read & checkAndRemove could be decoupled in the future.

Copy link
Collaborator

@Fuzzbawls Fuzzbawls left a comment

Choose a reason for hiding this comment

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

utACK 683fd6b

@furszy furszy merged commit 5b9f25e into PIVX-Project:master Oct 7, 2020
@random-zebra random-zebra removed the Needs Backport Placeholder tag for anything needing a backport to prior version branches label Dec 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Budget/Proposal System Bug Startup Wallet startup changes and/or improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants