From 74d999e568819306c33169592f6e96f5ab01e642 Mon Sep 17 00:00:00 2001 From: Nathan Marley Date: Sat, 30 Mar 2019 11:55:20 -0300 Subject: [PATCH] Remove watchdogs from existence (#2816) --- src/governance-object.cpp | 6 ------ src/governance-object.h | 1 - src/rpc/governance.cpp | 8 -------- 3 files changed, 15 deletions(-) diff --git a/src/governance-object.cpp b/src/governance-object.cpp index 9bcbe15ea..488f06956 100644 --- a/src/governance-object.cpp +++ b/src/governance-object.cpp @@ -454,10 +454,6 @@ bool CGovernanceObject::IsValidLocally(std::string& strError, bool& fMissingMast } switch (nObjectType) { - case GOVERNANCE_OBJECT_WATCHDOG: { - // watchdogs are deprecated - return false; - } case GOVERNANCE_OBJECT_PROPOSAL: { CProposalValidator validator(GetDataAsHexString(), true); // Note: It's ok to have expired proposals @@ -519,8 +515,6 @@ CAmount CGovernanceObject::GetMinCollateralFee() const return GOVERNANCE_PROPOSAL_FEE_TX; case GOVERNANCE_OBJECT_TRIGGER: return 0; - case GOVERNANCE_OBJECT_WATCHDOG: - return 0; default: return MAX_MONEY; } diff --git a/src/governance-object.h b/src/governance-object.h index c4e4f87b0..87a24dd76 100644 --- a/src/governance-object.h +++ b/src/governance-object.h @@ -31,7 +31,6 @@ static const double GOVERNANCE_FILTER_FP_RATE = 0.001; static const int GOVERNANCE_OBJECT_UNKNOWN = 0; static const int GOVERNANCE_OBJECT_PROPOSAL = 1; static const int GOVERNANCE_OBJECT_TRIGGER = 2; -static const int GOVERNANCE_OBJECT_WATCHDOG = 3; static const CAmount GOVERNANCE_PROPOSAL_FEE_TX = (5.0 * COIN); diff --git a/src/rpc/governance.cpp b/src/rpc/governance.cpp index 9637c4fa1..68361b89c 100644 --- a/src/rpc/governance.cpp +++ b/src/rpc/governance.cpp @@ -184,10 +184,6 @@ UniValue gobject_prepare(const JSONRPCRequest& request) throw JSONRPCError(RPC_INVALID_PARAMETER, "Trigger objects need not be prepared (however only masternodes can create them)"); } - if (govobj.GetObjectType() == GOVERNANCE_OBJECT_WATCHDOG) { - throw JSONRPCError(RPC_INVALID_PARAMETER, "Watchdogs are deprecated"); - } - LOCK2(cs_main, pwallet->cs_wallet); std::string strError = ""; @@ -294,10 +290,6 @@ UniValue gobject_submit(const JSONRPCRequest& request) } } - if (govobj.GetObjectType() == GOVERNANCE_OBJECT_WATCHDOG) { - throw JSONRPCError(RPC_INVALID_PARAMETER, "Watchdogs are deprecated"); - } - // Attempt to sign triggers if we are a MN if (govobj.GetObjectType() == GOVERNANCE_OBJECT_TRIGGER) { if (fMnFound) {