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; }
masternode_state_t GetState() const { return state; }
std::string GetStateString() const;
std::string GetStatus() const;

View File

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

View File

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

View File

@ -777,18 +777,6 @@ bool CInstantSend::GetTxLockVote(const uint256& hash, CTxLockVote& txLockVoteRet
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()
{
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;
extern bool fEnableInstantSend;
extern int nInstantSendDepth;
extern int nCompleteTXLocks;
/**
@ -82,8 +81,6 @@ private:
void UpdateLockedTransaction(const CTxLockCandidate& txLockCandidate);
bool ResolveConflicts(const CTxLockCandidate& txLockCandidate);
bool IsInstantSendReadyToLock(const uint256 &txHash);
public:
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_mapMasternodeBlocks;
extern CCriticalSection cs_mapMasternodePayeeVotes;
extern CMasternodePayments mnpayments;

View File

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

View File

@ -7,8 +7,6 @@
#include "chain.h"
#include "net.h"
#include <univalue.h>
class CMasternodeSync;
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_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;
//

View File

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

View File

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

View File

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