Skip to content

Commit

Permalink
fix: reorder CGovernanceManager field (dashpay#5550)
Browse files Browse the repository at this point in the history
## Issue being fixed or feature implemented
When building with `-Wreorder-ctor` capture, the build fails with
`error: field 'lastMNListForVotingKeys' will be initialized after field
'votedFundingYesTriggerHash'`

## What was done?
Moved down `votedFundingYesTriggerHash` to last position in
`CGovernanceManager`.

## How Has This Been Tested?

## Breaking Changes
 no

## Checklist:
- [x] 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
- [x] I have assigned this pull request to a milestone _(for repository
code-owners and collaborators only)_
  • Loading branch information
ogabrielides authored Aug 29, 2023
1 parent ceb84d5 commit 41ddf5a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/governance/governance.h
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,6 @@ class CGovernanceManager
// keep track of the scanning errors
std::map<uint256, CGovernanceObject> mapObjects;

std::optional<uint256> votedFundingYesTriggerHash;

// mapErasedGovernanceObjects contains key-value pairs, where
// key - governance object's hash
// value - expiration time for deleted objects
Expand All @@ -199,6 +197,8 @@ class CGovernanceManager
// used to check for changed voting keys
CDeterministicMNListPtr lastMNListForVotingKeys;

std::optional<uint256> votedFundingYesTriggerHash;

class ScopedLockBool
{
bool& ref;
Expand Down

0 comments on commit 41ddf5a

Please sign in to comment.