 |
PRCYCoin
2.0.0.7rc1
P2P Digital Currency
|
Go to the documentation of this file.
7 #ifndef MASTERNODEMAN_H
8 #define MASTERNODEMAN_H
19 #define MASTERNODES_DUMP_SECONDS (15 * 60)
20 #define MASTERNODES_DSEG_SECONDS (3 * 60 * 60)
86 template <
typename Stream,
typename Operation>
87 inline void SerializationOp(Stream& s, Operation ser_action,
int nType,
int nVersion)
120 void CountNetworks(
int protocolVersion,
int& ipv4,
int& ipv6,
int& onion);
141 std::vector<std::pair<int, CMasternode> >
GetMasternodeRanks(int64_t nBlockHeight,
int minProtocol = 0);
142 int GetMasternodeRank(
const CTxIn& vin, int64_t nBlockHeight,
int minProtocol = 0,
bool fOnlyActive =
true);
An input of a transaction.
void AskForMN(CNode *pnode, CTxIn &vin)
Ask (source) node for mnb.
int CountEnabled(int protocolVersion=-1)
void UpdateMasternodeList(CMasternodeBroadcast mnb)
Update masternode list and maps using provided CMasternodeBroadcast.
int GetMasternodeRank(const CTxIn &vin, int64_t nBlockHeight, int minProtocol=0, bool fOnlyActive=true)
CMasternode * Find(const CScript &payee)
Find an entry.
void CheckAndRemove(bool forceExpiredRemoval=false)
Check all Masternodes and remove inactive.
Information about a peer.
int size()
Return the number of (unique) Masternodes.
std::vector< CMasternode > vMasternodes
CMasternode * GetNextMasternodeInQueueForPayment(int nBlockHeight, bool fFilterSigTime, int &nCount)
Find an entry in the masternode list that is next to be paid.
std::string ToString() const
void ThreadCheckMasternodes()
int stable_size()
Return the number of Masternodes older than (default) 8000 seconds.
std::vector< std::pair< int, CMasternode > > GetMasternodeRanks(int64_t nBlockHeight, int minProtocol=0)
std::map< COutPoint, int64_t > mWeAskedForMasternodeListEntry
std::vector< CMasternode > GetFullMasternodeVector()
std::string strMasterNodePrivKey
void Clear()
Clear Masternode vector.
CMasternode * GetMasternodeByRank(int nRank, int64_t nBlockHeight, int minProtocol=0, bool fOnlyActive=true)
bool Write(const CMasternodeMan &mnodemanToSave)
std::map< uint256, CMasternodeBroadcast > mapSeenMasternodeBroadcast
bool Add(CMasternode &mn)
Add an entry.
CActiveMasternode activeMasternode
Keep track of the active Masternode.
CMasternode * GetCurrentMasterNode(int mod=1, int64_t nBlockHeight=0, int minProtocol=0)
Get the current winner for this block.
Serialized script, used inside transaction inputs and outputs.
void Check()
Check all Masternodes.
RecursiveMutex cs_process_message
void ProcessMessage(CNode *pfrom, std::string &strCommand, CDataStream &vRecv)
void CountNetworks(int protocolVersion, int &ipv4, int &ipv6, int &onion)
An encapsulated public key.
std::map< uint256, CMasternodePing > mapSeenMasternodePing
void DsegUpdate(CNode *pnode)
Double ended buffer combining vector and stream-like interfaces.
std::map< CNetAddr, int64_t > mAskedUsForMasternodeList
std::map< CNetAddr, int64_t > mWeAskedForMasternodeList
ReadResult Read(CMasternodeMan &mnodemanToLoad, bool fDryRun=false)
CMasternodeMan mnodeman
Masternode manager.
std::string strMagicMessage
void SerializationOp(Stream &s, Operation ser_action, int nType, int nVersion)
Access to the MN database (mncache.dat)