From 286f6ad87e6e1a8f650aff5e870ded7afe3880b5 Mon Sep 17 00:00:00 2001 From: Tim Flynn Date: Mon, 28 Nov 2016 19:01:03 -0500 Subject: [PATCH] Add watchdog expiration map to governance cache (#1170) * Fix misspelled logging category * Added mapWatchdogObjects to governance cache and bumped format version --- src/activemasternode.cpp | 2 +- src/governance.cpp | 2 +- src/governance.h | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/activemasternode.cpp b/src/activemasternode.cpp index 227631512..05efe914c 100644 --- a/src/activemasternode.cpp +++ b/src/activemasternode.cpp @@ -93,7 +93,7 @@ std::string CActiveMasternode::GetTypeString() const bool CActiveMasternode::SendMasternodePing() { if(!fPingerEnabled) { - LogPrint("masterndoe", "CActiveMasternode::SendMasternodePing -- %s: masternode ping service is disabled, skipping...\n", GetStateString()); + LogPrint("masternode", "CActiveMasternode::SendMasternodePing -- %s: masternode ping service is disabled, skipping...\n", GetStateString()); return false; } diff --git a/src/governance.cpp b/src/governance.cpp index 9122be844..e127f868a 100644 --- a/src/governance.cpp +++ b/src/governance.cpp @@ -28,7 +28,7 @@ std::map mapAskedForGovernanceObject; int nSubmittedFinalBudget; -const std::string CGovernanceManager::SERIALIZATION_VERSION_STRING = "CGovernanceManager-Version-1"; +const std::string CGovernanceManager::SERIALIZATION_VERSION_STRING = "CGovernanceManager-Version-2"; CGovernanceManager::CGovernanceManager() : pCurrentBlockIndex(NULL), diff --git a/src/governance.h b/src/governance.h index 101489117..e10abbfd7 100644 --- a/src/governance.h +++ b/src/governance.h @@ -188,6 +188,7 @@ public: LogPrint("gobject", "Governance object manager was cleared\n"); mapObjects.clear(); mapSeenGovernanceObjects.clear(); + mapWatchdogObjects.clear(); mapVoteToObject.Clear(); mapInvalidVotes.Clear(); mapOrphanVotes.Clear(); @@ -213,6 +214,7 @@ public: READWRITE(mapInvalidVotes); READWRITE(mapOrphanVotes); READWRITE(mapObjects); + READWRITE(mapWatchdogObjects); READWRITE(mapLastMasternodeTrigger); if(ser_action.ForRead() && (strVersion != SERIALIZATION_VERSION_STRING)) { Clear();