Skip to content

CGovernanceManager initialization fix#1138

Merged
UdjinM6 merged 4 commits intodashpay:v0.12.1.xfrom
tgflynn:v0.12.1.x-gov-syncing-pr-1
Nov 12, 2016
Merged

CGovernanceManager initialization fix#1138
UdjinM6 merged 4 commits intodashpay:v0.12.1.xfrom
tgflynn:v0.12.1.x-gov-syncing-pr-1

Conversation

@tgflynn
Copy link

@tgflynn tgflynn commented Nov 11, 2016

This fixes a problem with the initialiation of CGovernanceManager that caused non-reproducible failure of governance object syncing.

The code was relying on UpdatedBlockTip to be called by new blocks but sometimes a node is restarted before any new blocks have been generated and hence this function was not called in time.

This adds a call to UpdatedBlockTip to init.cpp that should ensure that pCurrentBlockIndex is initialized.

// Ignore such messages until masternode list is synced
if(!masternodeSync.IsMasternodeListSynced()) return;
if(!masternodeSync.IsMasternodeListSynced()) {
LogPrintf("CGovernanceManager::ProcessMessage MNGOVERNANCEOBJECTVOTE -- masternode list not synced\n");
Copy link

@UdjinM6 UdjinM6 Nov 11, 2016

Choose a reason for hiding this comment

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

this can spam a lot, I'd move this to gobject debug category

Copy link
Author

Choose a reason for hiding this comment

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

I don't think it should because we don't start syncing governance until the masternode list is synced. So I think this is more of an abnormal condition.

Copy link

Choose a reason for hiding this comment

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

This can easily be the case if at least one of our peers is in governance syncing mode (which means this node relays all received votes to us too). This multiplies with number of such peers but can quickly kill i/o even with one peer (given the fact that there will be 1000s of votes).

Copy link
Author

Choose a reason for hiding this comment

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

OK, I didn't think of that. Will change.

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.

utACK 1fb6b27

@UdjinM6 UdjinM6 merged commit 82ca5fd into dashpay:v0.12.1.x Nov 12, 2016
celbalrai added a commit to bytzcurrency/BYTZ that referenced this pull request Jul 15, 2021
- Port and adapt PIVX commits on time protocol V2 (PR dashpay#1002)
- Port PIVX commits on nTime offset warnings (PR dashpay#1138)
- Adjust chain parameters
- Add several copyright notices
bytzck pushed a commit to bytzck/BYTZ that referenced this pull request Jul 20, 2021
- Port and adapt PIVX commits on time protocol V2 (PR dashpay#1002)
- Port PIVX commits on nTime offset warnings (PR dashpay#1138)
- Adjust chain parameters
- Add several copyright notices
ckti added a commit to ckti-dash-current/dash that referenced this pull request Apr 7, 2022
- Port and adapt PIVX commits on time protocol V2 (PR dashpay#1002)
- Port PIVX commits on nTime offset warnings (PR dashpay#1138)
- Adjust chain parameters
- Add several copyright notices
ckti pushed a commit to ckti-dash-current/dash that referenced this pull request Apr 26, 2022
- Port and adapt PIVX commits on time protocol V2 (PR dashpay#1002)
- Port PIVX commits on nTime offset warnings (PR dashpay#1138)
- Adjust chain parameters
- Add several copyright notices
wagerr-builder pushed a commit to wagerr-builder/wagerr that referenced this pull request Apr 27, 2022
- Port and adapt PIVX commits on time protocol V2 (PR dashpay#1002)
- Port PIVX commits on nTime offset warnings (PR dashpay#1138)
- Adjust chain parameters
- Add several copyright notices
wagerr-builder pushed a commit to wagerr-builder/wagerr that referenced this pull request Apr 29, 2022
- Port and adapt PIVX commits on time protocol V2 (PR dashpay#1002)
- Port PIVX commits on nTime offset warnings (PR dashpay#1138)
- Adjust chain parameters
- Add several copyright notices
wagerr-builder pushed a commit to wagerr-builder/wagerr that referenced this pull request May 2, 2022
- Port and adapt PIVX commits on time protocol V2 (PR dashpay#1002)
- Port PIVX commits on nTime offset warnings (PR dashpay#1138)
- Adjust chain parameters
- Add several copyright notices
wagerr-builder pushed a commit to wagerr-builder/wagerr that referenced this pull request May 6, 2022
- Port and adapt PIVX commits on time protocol V2 (PR dashpay#1002)
- Port PIVX commits on nTime offset warnings (PR dashpay#1138)
- Adjust chain parameters
- Add several copyright notices
wagerr-builder pushed a commit to wagerr-builder/wagerr that referenced this pull request May 10, 2022
- Port and adapt PIVX commits on time protocol V2 (PR dashpay#1002)
- Port PIVX commits on nTime offset warnings (PR dashpay#1138)
- Adjust chain parameters
- Add several copyright notices
wagerr-builder pushed a commit to wagerr-builder/wagerr that referenced this pull request May 13, 2022
- Port and adapt PIVX commits on time protocol V2 (PR dashpay#1002)
- Port PIVX commits on nTime offset warnings (PR dashpay#1138)
- Adjust chain parameters
- Add several copyright notices
wagerr-builder pushed a commit to wagerr-builder/wagerr that referenced this pull request May 14, 2022
- Port and adapt PIVX commits on time protocol V2 (PR dashpay#1002)
- Port PIVX commits on nTime offset warnings (PR dashpay#1138)
- Adjust chain parameters
- Add several copyright notices
wagerr-builder pushed a commit to wagerr-builder/wagerr that referenced this pull request May 15, 2022
- Port and adapt PIVX commits on time protocol V2 (PR dashpay#1002)
- Port PIVX commits on nTime offset warnings (PR dashpay#1138)
- Adjust chain parameters
- Add several copyright notices
wagerr-builder pushed a commit to wagerr-builder/wagerr that referenced this pull request May 15, 2022
- Port and adapt PIVX commits on time protocol V2 (PR dashpay#1002)
- Port PIVX commits on nTime offset warnings (PR dashpay#1138)
- Adjust chain parameters
- Add several copyright notices
wagerr-builder pushed a commit to wagerr-builder/wagerr that referenced this pull request May 15, 2022
- Port and adapt PIVX commits on time protocol V2 (PR dashpay#1002)
- Port PIVX commits on nTime offset warnings (PR dashpay#1138)
- Adjust chain parameters
- Add several copyright notices
wagerr-builder pushed a commit to wagerr-builder/wagerr that referenced this pull request May 15, 2022
- Port and adapt PIVX commits on time protocol V2 (PR dashpay#1002)
- Port PIVX commits on nTime offset warnings (PR dashpay#1138)
- Adjust chain parameters
- Add several copyright notices
wagerr-builder pushed a commit to wagerr-builder/wagerr that referenced this pull request May 16, 2022
- Port and adapt PIVX commits on time protocol V2 (PR dashpay#1002)
- Port PIVX commits on nTime offset warnings (PR dashpay#1138)
- Adjust chain parameters
- Add several copyright notices
wagerr-builder pushed a commit to wagerr-builder/wagerr that referenced this pull request May 16, 2022
- Port and adapt PIVX commits on time protocol V2 (PR dashpay#1002)
- Port PIVX commits on nTime offset warnings (PR dashpay#1138)
- Adjust chain parameters
- Add several copyright notices
wagerr-builder pushed a commit to wagerr-builder/wagerr that referenced this pull request May 17, 2022
- Port and adapt PIVX commits on time protocol V2 (PR dashpay#1002)
- Port PIVX commits on nTime offset warnings (PR dashpay#1138)
- Adjust chain parameters
- Add several copyright notices
wagerr-builder pushed a commit to wagerr-builder/wagerr that referenced this pull request May 23, 2022
- Port and adapt PIVX commits on time protocol V2 (PR dashpay#1002)
- Port PIVX commits on nTime offset warnings (PR dashpay#1138)
- Adjust chain parameters
- Add several copyright notices
wagerr-builder pushed a commit to wagerr-builder/wagerr that referenced this pull request Jun 14, 2022
- Port and adapt PIVX commits on time protocol V2 (PR dashpay#1002)
- Port PIVX commits on nTime offset warnings (PR dashpay#1138)
- Adjust chain parameters
- Add several copyright notices
wagerr-builder pushed a commit to wagerr-builder/wagerr that referenced this pull request Jun 15, 2022
- Port and adapt PIVX commits on time protocol V2 (PR dashpay#1002)
- Port PIVX commits on nTime offset warnings (PR dashpay#1138)
- Adjust chain parameters
- Add several copyright notices
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.

2 participants