cleanup: remove unused vars, includes, functions (#2306)

This commit is contained in:
Nathan Marley 2018-09-20 05:41:16 -07:00 committed by UdjinM6
parent 85a958a360
commit 2c1a17909e
11 changed files with 0 additions and 57 deletions

View File

@ -62,7 +62,6 @@ public:
CDeterministicMNCPtr GetDMN() const { return mnListEntry; } CDeterministicMNCPtr GetDMN() const { return mnListEntry; }
masternode_state_t GetState() const { return state; }
std::string GetStateString() const; std::string GetStateString() const;
std::string GetStatus() const; std::string GetStatus() const;

View File

@ -13,13 +13,9 @@
#include "util.h" #include "util.h"
class CSuperblock; class CSuperblock;
class CGovernanceTrigger;
class CGovernanceTriggerManager; class CGovernanceTriggerManager;
class CSuperblockManager; class CSuperblockManager;
static const int TRIGGER_UNKNOWN = -1;
static const int TRIGGER_SUPERBLOCK = 1000;
typedef std::shared_ptr<CSuperblock> CSuperblock_sptr; typedef std::shared_ptr<CSuperblock> CSuperblock_sptr;
// DECLARE GLOBAL VARIABLES FOR GOVERNANCE CLASSES // DECLARE GLOBAL VARIABLES FOR GOVERNANCE CLASSES
@ -40,7 +36,6 @@ class CGovernanceTriggerManager
private: private:
typedef std::map<uint256, CSuperblock_sptr> trigger_m_t; typedef std::map<uint256, CSuperblock_sptr> trigger_m_t;
typedef trigger_m_t::iterator trigger_m_it; typedef trigger_m_t::iterator trigger_m_it;
typedef trigger_m_t::const_iterator trigger_m_cit;
trigger_m_t mapTrigger; trigger_m_t mapTrigger;

View File

@ -239,10 +239,6 @@ public:
return fExpired; return fExpired;
} }
void InvalidateVoteCache() {
fDirtyCache = true;
}
const CGovernanceObjectVoteFile& GetVoteFile() const { const CGovernanceObjectVoteFile& GetVoteFile() const {
return fileVotes; return fileVotes;
} }

View File

@ -777,18 +777,6 @@ bool CInstantSend::GetTxLockVote(const uint256& hash, CTxLockVote& txLockVoteRet
return true; return true;
} }
bool CInstantSend::IsInstantSendReadyToLock(const uint256& txHash)
{
if(!fEnableInstantSend || GetfLargeWorkForkFound() || GetfLargeWorkInvalidChainFound() ||
!sporkManager.IsSporkActive(SPORK_2_INSTANTSEND_ENABLED)) return false;
LOCK(cs_instantsend);
// There must be a successfully verified lock request
// and all outputs must be locked (i.e. have enough signatures)
std::map<uint256, CTxLockCandidate>::iterator it = mapTxLockCandidates.find(txHash);
return it != mapTxLockCandidates.end() && it->second.IsAllOutPointsReady();
}
void CInstantSend::Clear() void CInstantSend::Clear()
{ {
LOCK(cs_instantsend); LOCK(cs_instantsend);

View File

@ -36,7 +36,6 @@ static const int INSTANTSEND_LOCK_TIMEOUT_SECONDS = 15;
static const int INSTANTSEND_FAILED_TIMEOUT_SECONDS = 60; static const int INSTANTSEND_FAILED_TIMEOUT_SECONDS = 60;
extern bool fEnableInstantSend; extern bool fEnableInstantSend;
extern int nInstantSendDepth;
extern int nCompleteTXLocks; extern int nCompleteTXLocks;
/** /**
@ -82,8 +81,6 @@ private:
void UpdateLockedTransaction(const CTxLockCandidate& txLockCandidate); void UpdateLockedTransaction(const CTxLockCandidate& txLockCandidate);
bool ResolveConflicts(const CTxLockCandidate& txLockCandidate); bool ResolveConflicts(const CTxLockCandidate& txLockCandidate);
bool IsInstantSendReadyToLock(const uint256 &txHash);
public: public:
mutable CCriticalSection cs_instantsend; mutable CCriticalSection cs_instantsend;

View File

@ -28,7 +28,6 @@ static const int MIN_MASTERNODE_PAYMENT_PROTO_VERSION_2 = 70210;
extern CCriticalSection cs_vecPayees; extern CCriticalSection cs_vecPayees;
extern CCriticalSection cs_mapMasternodeBlocks; extern CCriticalSection cs_mapMasternodeBlocks;
extern CCriticalSection cs_mapMasternodePayeeVotes;
extern CMasternodePayments mnpayments; extern CMasternodePayments mnpayments;

View File

@ -3,18 +3,14 @@
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "activemasternode.h" #include "activemasternode.h"
#include "checkpoints.h"
#include "governance.h" #include "governance.h"
#include "validation.h" #include "validation.h"
#include "masternode.h"
#include "masternode-payments.h" #include "masternode-payments.h"
#include "masternode-sync.h" #include "masternode-sync.h"
#include "masternodeman.h" #include "masternodeman.h"
#include "netfulfilledman.h" #include "netfulfilledman.h"
#include "netmessagemaker.h" #include "netmessagemaker.h"
#include "spork.h"
#include "ui_interface.h" #include "ui_interface.h"
#include "util.h"
#include "evo/deterministicmns.h" #include "evo/deterministicmns.h"
class CMasternodeSync; class CMasternodeSync;

View File

@ -7,8 +7,6 @@
#include "chain.h" #include "chain.h"
#include "net.h" #include "net.h"
#include <univalue.h>
class CMasternodeSync; class CMasternodeSync;
static const int MASTERNODE_SYNC_FAILED = -1; static const int MASTERNODE_SYNC_FAILED = -1;
@ -24,8 +22,6 @@ static const int MASTERNODE_SYNC_FINISHED = 999;
static const int MASTERNODE_SYNC_TICK_SECONDS = 6; static const int MASTERNODE_SYNC_TICK_SECONDS = 6;
static const int MASTERNODE_SYNC_TIMEOUT_SECONDS = 30; // our blocks are 2.5 minutes so 30 seconds should be fine static const int MASTERNODE_SYNC_TIMEOUT_SECONDS = 30; // our blocks are 2.5 minutes so 30 seconds should be fine
static const int MASTERNODE_SYNC_ENOUGH_PEERS = 6;
extern CMasternodeSync masternodeSync; extern CMasternodeSync masternodeSync;
// //

View File

@ -36,41 +36,21 @@ public:
return alias; return alias;
} }
void setAlias(const std::string& alias) {
this->alias = alias;
}
const std::string& getOutputIndex() const { const std::string& getOutputIndex() const {
return outputIndex; return outputIndex;
} }
void setOutputIndex(const std::string& outputIndex) {
this->outputIndex = outputIndex;
}
const std::string& getPrivKey() const { const std::string& getPrivKey() const {
return privKey; return privKey;
} }
void setPrivKey(const std::string& privKey) {
this->privKey = privKey;
}
const std::string& getTxHash() const { const std::string& getTxHash() const {
return txHash; return txHash;
} }
void setTxHash(const std::string& txHash) {
this->txHash = txHash;
}
const std::string& getIp() const { const std::string& getIp() const {
return ip; return ip;
} }
void setIp(const std::string& ip) {
this->ip = ip;
}
}; };
CMasternodeConfig() { CMasternodeConfig() {

View File

@ -135,7 +135,6 @@ public:
/// Ask (source) node for mnb /// Ask (source) node for mnb
void AskForMN(CNode *pnode, const COutPoint& outpoint, CConnman& connman); void AskForMN(CNode *pnode, const COutPoint& outpoint, CConnman& connman);
void AskForMnb(CNode *pnode, const uint256 &hash);
bool PoSeBan(const COutPoint &outpoint); bool PoSeBan(const COutPoint &outpoint);
bool AllowMixing(const COutPoint &outpoint); bool AllowMixing(const COutPoint &outpoint);

View File

@ -621,13 +621,11 @@ UniValue masternode_info(const JSONRPCRequest& request)
CTransactionRef tx; CTransactionRef tx;
uint256 hashBlock; uint256 hashBlock;
bool fromMempool = false;
auto dmn = deterministicMNManager->GetListAtChainTip().GetMN(proTxHash); auto dmn = deterministicMNManager->GetListAtChainTip().GetMN(proTxHash);
if (!dmn) { if (!dmn) {
tx = mempool.get(proTxHash); tx = mempool.get(proTxHash);
if (tx) { if (tx) {
fromMempool = true;
if (tx->nVersion < 3 || tx->nType != TRANSACTION_PROVIDER_REGISTER) if (tx->nVersion < 3 || tx->nType != TRANSACTION_PROVIDER_REGISTER)
throw JSONRPCError(RPC_INVALID_PARAMETER, "TX is not a ProTx"); throw JSONRPCError(RPC_INVALID_PARAMETER, "TX is not a ProTx");
CProRegTx tmpProTx; CProRegTx tmpProTx;