Skip to content

Conversation

@random-zebra
Copy link

@random-zebra random-zebra commented Sep 20, 2020

Based on top of

Starting with [Trivial] Rename global budget object to g_budgetman (64f0840)

This refactors CFinalizedBudget::SubmitVote, moving it to the budget manager (VoteOnFinalizedBudgets), and removing the nested locking issues.
It also does some trivial cleanup:

  • rename the global budget manager g_budgetman
  • pass const references to CBudgetVote/CFinalizedBudget constructors
  • pass the manager externally to DumpBudgets (instead of using the global one)

@random-zebra
Copy link
Author

Rebased on master. Ready for review.

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.

Looking pretty nice, made a first pass through the commits, only minor styling nits for now.

@random-zebra
Copy link
Author

Nits addressed.

Fuzzbawls
Fuzzbawls previously approved these changes Nov 5, 2020
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.

ACK 03b925b269a2d9b9107b2a791120dc3d21808250

@random-zebra
Copy link
Author

Rebased on master. Ready to be merged.

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.

utACK 5c0d2aa after rebase for 1916 and merging..

@furszy furszy merged commit 8f37bcc into PIVX-Project:master Nov 6, 2020
furszy added a commit that referenced this pull request Nov 17, 2020
…iles

c7051e7 [Cleanup] Remove masternode-budget.cpp/.h (random-zebra)
e4f1f5e [MOVE-ONLY] Move CBudgetDB to budgetdb.h/cpp (random-zebra)
682067b [MOVE-ONLY] Move CBudgetManager to budgetmanager.h/cpp (random-zebra)
6053dc3 [MOVE-ONLY] move CBudgetProposal/CFinalizedBudget to separate files (random-zebra)
3d8ecaf [MOVE-ONLY] move CBudgetVote/CFinalizedBudgetVote to separate files (random-zebra)

Pull request description:

  Based on top of
  - [x] #1861

  Final round for this first cleanup of the budget classes.
  MOVE-ONLY commits. Split masternode-budget.h/.cpp in single files inside the `budget` subdir:
  - `budget/budgetdb.*` (CBudgetDB)
  - `budget/budgetmanager.*` (CBudgetManager)
  - `budget/budgetproposal.*` (CBudgetProposal)
  - `budget/budgetvote.*` (CBudgetVote)
  - `budget/finalizedbudget.*` (CFinalizedBudget)
  - `budget/finalizedbudgetvote.*` (CFinalizedBudgetVote)

ACKs for top commit:
  furszy:
    looking good, utACK c7051e7
  Fuzzbawls:
    ACK c7051e7

Tree-SHA512: 59d009110c615650cd4107b5ae0f8ed0a84652b033eb7e6b35b37d42f18631451c42326ac153e8c97818bf5b54020d2eca383ff2e12f274edcaa9d2bcf7137ea
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants