Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Erik Jansen
crown-core-test-new-gitlab-runner
Commits
177125ac
Commit
177125ac
authored
9 years ago
by
Evan Duffield
Browse files
Options
Download
Email Patches
Plain Diff
Clear seen on boot and everyday
parent
309085d6
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/init.cpp
+1
-0
src/init.cpp
src/masternode-budget.cpp
+4
-1
src/masternode-budget.cpp
src/masternode-budget.h
+7
-0
src/masternode-budget.h
with
12 additions
and
1 deletion
+12
-1
src/init.cpp
View file @
177125ac
...
...
@@ -1442,6 +1442,7 @@ bool AppInit2(boost::thread_group& threadGroup)
//flag our cached items so we send them to our peers
budget
.
ResetSync
();
budget
.
ClearSeen
();
uiInterface
.
InitMessage
(
_
(
"Loading masternode payment cache..."
));
...
...
This diff is collapsed.
Click to expand it.
src/masternode-budget.cpp
View file @
177125ac
...
...
@@ -785,7 +785,10 @@ void CBudgetManager::NewBlock()
// incremental sync with our peers
if(masternodeSync.IsSynced()){
LogPrintf("CBudgetManager::NewBlock - incremental sync started");
if(chainActive.Height() % 600 == rand() % 600) ResetSync();
if(chainActive.Height() % 600 == rand() % 600) {
ClearSeen();
ResetSync();
}
LOCK(cs_vNodes);
BOOST_FOREACH(CNode* pnode, vNodes)
...
...
This diff is collapsed.
Click to expand it.
src/masternode-budget.h
View file @
177125ac
...
...
@@ -102,6 +102,13 @@ public:
mapFinalizedBudgets
.
clear
();
}
void
ClearSeen
()
{
mapSeenMasternodeBudgetProposals
.
clear
();
mapSeenMasternodeBudgetVotes
.
clear
();
mapSeenFinalizedBudgets
.
clear
();
mapSeenFinalizedBudgetVotes
.
clear
();
}
int
sizeFinalized
()
{
return
(
int
)
mapFinalizedBudgets
.
size
();}
int
sizeProposals
()
{
return
(
int
)
mapProposals
.
size
();}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help