![]() |
Dash Core
0.12.2.1
P2P Digital Currency
|
#include <masternode.h>
Public Member Functions | |
CMasternode () | |
CMasternode (const CMasternode &other) | |
CMasternode (const CMasternodeBroadcast &mnb) | |
CMasternode (CService addrNew, COutPoint outpointNew, CPubKey pubKeyCollateralAddressNew, CPubKey pubKeyMasternodeNew, int nProtocolVersionIn) | |
template<typename Stream , typename Operation > | |
void | SerializationOp (Stream &s, Operation ser_action, int nType, int nVersion) |
arith_uint256 | CalculateScore (const uint256 &blockHash) |
bool | UpdateFromNewBroadcast (CMasternodeBroadcast &mnb, CConnman &connman) |
void | Check (bool fForce=false) |
bool | IsBroadcastedWithin (int nSeconds) |
bool | IsPingedWithin (int nSeconds, int64_t nTimeToCheckAt=-1) |
bool | IsEnabled () |
bool | IsPreEnabled () |
bool | IsPoSeBanned () |
bool | IsPoSeVerified () |
bool | IsExpired () |
bool | IsOutpointSpent () |
bool | IsUpdateRequired () |
bool | IsWatchdogExpired () |
bool | IsNewStartRequired () |
bool | IsValidForPayment () |
bool | IsInputAssociatedWithPubkey () |
Is the input associated with collateral public key? (and there is 1000 DASH - checking if valid masternode) More... | |
bool | IsValidNetAddr () |
void | IncreasePoSeBanScore () |
void | DecreasePoSeBanScore () |
void | PoSeBan () |
masternode_info_t | GetInfo () |
std::string | GetStateString () const |
std::string | GetStatus () const |
int | GetLastPaidTime () |
int | GetLastPaidBlock () |
void | UpdateLastPaid (const CBlockIndex *pindex, int nMaxBlocksToScanBack) |
void | AddGovernanceVote (uint256 nGovernanceObjectHash) |
void | FlagGovernanceItemsAsDirty () |
void | RemoveGovernanceObject (uint256 nGovernanceObjectHash) |
void | UpdateWatchdogVoteTime (uint64_t nVoteTime=0) |
CMasternode & | operator= (CMasternode const &from) |
![]() | |
masternode_info_t ()=default | |
masternode_info_t (masternode_info_t const &)=default | |
masternode_info_t (int activeState, int protoVer, int64_t sTime) | |
masternode_info_t (int activeState, int protoVer, int64_t sTime, COutPoint const &outpoint, CService const &addr, CPubKey const &pkCollAddr, CPubKey const &pkMN, int64_t tWatchdogV=0) | |
Static Public Member Functions | |
static CollateralStatus | CheckCollateral (const COutPoint &outpoint) |
static CollateralStatus | CheckCollateral (const COutPoint &outpoint, int &nHeightRet) |
static bool | IsValidStateForAutoStart (int nActiveStateIn) |
static bool | IsValidNetAddr (CService addrIn) |
static std::string | StateToString (int nStateIn) |
Public Attributes | |
CMasternodePing | lastPing {} |
std::vector< unsigned char > | vchSig {} |
uint256 | nCollateralMinConfBlockHash {} |
int | nBlockLastPaid {} |
int | nPoSeBanScore {} |
int | nPoSeBanHeight {} |
bool | fAllowMixingTx {} |
bool | fUnitTest = false |
std::map< uint256, int > | mapGovernanceObjectsVotedOn |
ADD_SERIALIZE_METHODS | |
![]() | |
int | nActiveState = 0 |
int | nProtocolVersion = 0 |
int64_t | sigTime = 0 |
CTxIn | vin {} |
CService | addr {} |
CPubKey | pubKeyCollateralAddress {} |
CPubKey | pubKeyMasternode {} |
int64_t | nTimeLastWatchdogVote = 0 |
int64_t | nLastDsq = 0 |
int64_t | nTimeLastChecked = 0 |
int64_t | nTimeLastPaid = 0 |
int64_t | nTimeLastPing = 0 |
bool | fInfoValid = false |
Private Attributes | |
CCriticalSection | cs |
Definition at line 131 of file masternode.h.
Enumerator | |
---|---|
COLLATERAL_OK | |
COLLATERAL_UTXO_NOT_FOUND | |
COLLATERAL_INVALID_AMOUNT |
Definition at line 149 of file masternode.h.
enum CMasternode::state |
Definition at line 138 of file masternode.h.
CMasternode::CMasternode | ( | ) |
Definition at line 18 of file masternode.cpp.
CMasternode::CMasternode | ( | const CMasternode & | other | ) |
Definition at line 29 of file masternode.cpp.
CMasternode::CMasternode | ( | const CMasternodeBroadcast & | mnb | ) |
Definition at line 41 of file masternode.cpp.
CMasternode::CMasternode | ( | CService | addrNew, |
COutPoint | outpointNew, | ||
CPubKey | pubKeyCollateralAddressNew, | ||
CPubKey | pubKeyMasternodeNew, | ||
int | nProtocolVersionIn | ||
) |
Definition at line 23 of file masternode.cpp.
void CMasternode::AddGovernanceVote | ( | uint256 | nGovernanceObjectHash | ) |
Definition at line 830 of file masternode.cpp.
Referenced by CMasternodeMan::AddGovernanceVote().
arith_uint256 CMasternode::CalculateScore | ( | const uint256 & | blockHash | ) |
Definition at line 91 of file masternode.cpp.
Referenced by CMasternodeMan::GetNextMasternodeInQueueForPayment().
void CMasternode::Check | ( | bool | fForce = false | ) |
Definition at line 139 of file masternode.cpp.
Referenced by CMasternodePing::CheckAndUpdate(), CMasternodeMan::CheckMnbAndUpdateMasternodeList(), and CMasternodeBroadcast::Update().
|
static |
Definition at line 116 of file masternode.cpp.
Referenced by Check(), CMasternodeBroadcast::CheckOutpoint(), and CGovernanceObject::IsValidLocally().
|
static |
Definition at line 122 of file masternode.cpp.
|
inline |
Definition at line 261 of file masternode.h.
Referenced by Check(), and CMasternodeMan::ProcessVerifyReply().
void CMasternode::FlagGovernanceItemsAsDirty | ( | ) |
FLAG GOVERNANCE ITEMS AS DIRTY
Definition at line 860 of file masternode.cpp.
masternode_info_t CMasternode::GetInfo | ( | ) |
Definition at line 286 of file masternode.cpp.
Referenced by CMasternodeMan::FindRandomNotInVec(), and CMasternodeMan::GetNextMasternodeInQueueForPayment().
|
inline |
Definition at line 271 of file masternode.h.
Referenced by masternodelist().
|
inline |
Definition at line 270 of file masternode.h.
Referenced by masternodelist().
std::string CMasternode::GetStateString | ( | ) | const |
Definition at line 309 of file masternode.cpp.
Referenced by Check(), CMasternodeMan::CheckMnbAndUpdateMasternodeList(), and GetStatus().
std::string CMasternode::GetStatus | ( | ) | const |
Definition at line 314 of file masternode.cpp.
Referenced by masternodelist(), and MasternodeList::updateNodeList().
|
inline |
Definition at line 260 of file masternode.h.
Referenced by CMasternodeMan::CheckSameAddr(), and CMasternodeMan::ProcessVerifyReply().
|
inline |
Definition at line 210 of file masternode.h.
Referenced by CMasternodeBroadcast::Update().
|
inline |
Definition at line 222 of file masternode.h.
Referenced by CMasternodePing::CheckAndUpdate(), CMasternodeMan::CheckSameAddr(), and CMasternodeMan::FindRandomNotInVec().
|
inline |
Definition at line 227 of file masternode.h.
Referenced by Check(), and CMasternodePing::CheckAndUpdate().
bool CMasternode::IsInputAssociatedWithPubkey | ( | ) |
Is the input associated with collateral public key? (and there is 1000 DASH - checking if valid masternode)
Definition at line 258 of file masternode.cpp.
Referenced by CMasternodeBroadcast::CheckOutpoint().
|
inline |
Definition at line 231 of file masternode.h.
Referenced by Check(), and CMasternodePing::CheckAndUpdate().
|
inline |
Definition at line 228 of file masternode.h.
Referenced by Check().
|
inline |
Definition at line 212 of file masternode.h.
Referenced by Check(), CMasternodePing::CheckAndUpdate(), and CMasternodeMan::IsMasternodePingedWithin().
|
inline |
Definition at line 224 of file masternode.h.
Referenced by Check(), and CMasternodeBroadcast::Update().
|
inline |
Definition at line 226 of file masternode.h.
Referenced by CMasternodeMan::CheckSameAddr().
|
inline |
Definition at line 223 of file masternode.h.
Referenced by CMasternodeMan::CheckSameAddr().
|
inline |
Definition at line 229 of file masternode.h.
Referenced by CMasternodePing::CheckAndUpdate().
|
inline |
Definition at line 241 of file masternode.h.
bool CMasternode::IsValidNetAddr | ( | ) |
Definition at line 273 of file masternode.cpp.
Referenced by CMasternodeBroadcast::Create(), CActiveMasternode::ManageStateInitial(), and CMasternodeBroadcast::SimpleCheck().
|
static |
Definition at line 278 of file masternode.cpp.
|
inlinestatic |
Definition at line 233 of file masternode.h.
Referenced by CMasternodeMan::CheckMnbAndUpdateMasternodeList(), and CActiveMasternode::ManageStateRemote().
|
inline |
Definition at line 230 of file masternode.h.
Referenced by Check(), and CMasternodePing::CheckAndUpdate().
|
inline |
Definition at line 283 of file masternode.h.
|
inline |
Definition at line 262 of file masternode.h.
Referenced by CMasternodeMan::PoSeBan().
void CMasternode::RemoveGovernanceObject | ( | uint256 | nGovernanceObjectHash | ) |
Definition at line 839 of file masternode.cpp.
|
inline |
Definition at line 177 of file masternode.h.
|
static |
Definition at line 294 of file masternode.cpp.
Referenced by GetStateString(), CActiveMasternode::ManageStateRemote(), and MasternodeList::updateMyMasternodeInfo().
bool CMasternode::UpdateFromNewBroadcast | ( | CMasternodeBroadcast & | mnb, |
CConnman & | connman | ||
) |
Definition at line 53 of file masternode.cpp.
Referenced by CMasternodeBroadcast::Update().
void CMasternode::UpdateLastPaid | ( | const CBlockIndex * | pindex, |
int | nMaxBlocksToScanBack | ||
) |
Definition at line 320 of file masternode.cpp.
void CMasternode::UpdateWatchdogVoteTime | ( | uint64_t | nVoteTime = 0 | ) |
Definition at line 848 of file masternode.cpp.
Referenced by CMasternodeMan::UpdateWatchdogVoteTime().
CMasternode::ADD_SERIALIZE_METHODS |
Definition at line 174 of file masternode.h.
|
mutableprivate |
Definition at line 135 of file masternode.h.
Referenced by Check(), SerializationOp(), and UpdateWatchdogVoteTime().
bool CMasternode::fAllowMixingTx {} |
Definition at line 163 of file masternode.h.
Referenced by CMasternodeMan::AllowMixing(), CMasternodeMan::DisallowMixing(), operator=(), ProcessMessage(), and SerializationOp().
bool CMasternode::fUnitTest = false |
Definition at line 164 of file masternode.h.
Referenced by Check(), operator=(), and SerializationOp().
CMasternodePing CMasternode::lastPing {} |
Definition at line 156 of file masternode.h.
Referenced by Check(), CMasternodePing::CheckAndUpdate(), CMasternodeMan::CheckMnbAndUpdateMasternodeList(), CMasternodeBroadcast::Create(), GetInfo(), IsPingedWithin(), masternodebroadcast(), masternodelist(), operator=(), SerializationOp(), CMasternodeBroadcast::SerializationOp(), CMasternodeMan::SetMasternodeLastPing(), CMasternodeBroadcast::SimpleCheck(), UpdateFromNewBroadcast(), CMasternodeMan::UpdateMasternodeList(), and MasternodeList::updateNodeList().
std::map<uint256, int> CMasternode::mapGovernanceObjectsVotedOn |
Definition at line 167 of file masternode.h.
Referenced by AddGovernanceVote(), FlagGovernanceItemsAsDirty(), operator=(), RemoveGovernanceObject(), and SerializationOp().
int CMasternode::nBlockLastPaid {} |
Definition at line 160 of file masternode.h.
Referenced by GetLastPaidBlock(), operator=(), SerializationOp(), and UpdateLastPaid().
uint256 CMasternode::nCollateralMinConfBlockHash {} |
Definition at line 159 of file masternode.h.
Referenced by CalculateScore(), CMasternodeBroadcast::CheckOutpoint(), CActiveMasternode::ManageStateLocal(), operator=(), and SerializationOp().
int CMasternode::nPoSeBanHeight {} |
Definition at line 162 of file masternode.h.
Referenced by Check(), operator=(), SerializationOp(), and UpdateFromNewBroadcast().
int CMasternode::nPoSeBanScore {} |
Definition at line 161 of file masternode.h.
Referenced by Check(), CMasternodeMan::CheckMnbAndUpdateMasternodeList(), DecreasePoSeBanScore(), IncreasePoSeBanScore(), IsPoSeVerified(), operator=(), PoSeBan(), CMasternodeMan::ProcessVerifyReply(), SerializationOp(), and UpdateFromNewBroadcast().
std::vector<unsigned char> CMasternode::vchSig {} |
Definition at line 157 of file masternode.h.
Referenced by CMasternodeBroadcast::CheckSignature(), masternodebroadcast(), operator=(), SerializationOp(), CMasternodeBroadcast::SerializationOp(), CMasternodeBroadcast::Sign(), and UpdateFromNewBroadcast().