![]() |
Dash Core
0.12.2.1
P2P Digital Currency
|
#include <masternode.h>
Public Member Functions | |
CMasternodeBroadcast () | |
CMasternodeBroadcast (const CMasternode &mn) | |
CMasternodeBroadcast (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) |
uint256 | GetHash () const |
bool | SimpleCheck (int &nDos) |
bool | Update (CMasternode *pmn, int &nDos, CConnman &connman) |
bool | CheckOutpoint (int &nDos) |
bool | Sign (const CKey &keyCollateralAddress) |
bool | CheckSignature (int &nDos) |
void | Relay (CConnman &connman) |
![]() | |
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 bool | Create (const COutPoint &outpoint, const CService &service, const CKey &keyCollateralAddressNew, const CPubKey &pubKeyCollateralAddressNew, const CKey &keyMasternodeNew, const CPubKey &pubKeyMasternodeNew, std::string &strErrorRet, CMasternodeBroadcast &mnbRet) |
Create Masternode broadcast, needs to be relayed manually after that. More... | |
static bool | Create (std::string strService, std::string strKey, std::string strTxHash, std::string strOutputIndex, std::string &strErrorRet, CMasternodeBroadcast &mnbRet, bool fOffline=false) |
![]() | |
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 | |
bool | fRecovery |
ADD_SERIALIZE_METHODS | |
![]() | |
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 |
Additional Inherited Members | |
![]() | |
enum | state { MASTERNODE_PRE_ENABLED, MASTERNODE_ENABLED, MASTERNODE_EXPIRED, MASTERNODE_OUTPOINT_SPENT, MASTERNODE_UPDATE_REQUIRED, MASTERNODE_WATCHDOG_EXPIRED, MASTERNODE_NEW_START_REQUIRED, MASTERNODE_POSE_BAN } |
enum | CollateralStatus { COLLATERAL_OK, COLLATERAL_UTXO_NOT_FOUND, COLLATERAL_INVALID_AMOUNT } |
Definition at line 313 of file masternode.h.
|
inline |
Definition at line 319 of file masternode.h.
Referenced by Create().
|
inline |
Definition at line 320 of file masternode.h.
|
inline |
Definition at line 321 of file masternode.h.
bool CMasternodeBroadcast::CheckOutpoint | ( | int & | nDos | ) |
Definition at line 543 of file masternode.cpp.
Referenced by CMasternodeMan::CheckMnbAndUpdateMasternodeList().
bool CMasternodeBroadcast::CheckSignature | ( | int & | nDos | ) |
Definition at line 644 of file masternode.cpp.
Referenced by CheckOutpoint(), masternodebroadcast(), and Update().
|
static |
Create Masternode broadcast, needs to be relayed manually after that.
Definition at line 397 of file masternode.cpp.
Referenced by Create(), CActiveMasternode::ManageStateLocal(), masternode(), masternodebroadcast(), MasternodeList::StartAlias(), and MasternodeList::StartAll().
|
static |
Definition at line 359 of file masternode.cpp.
|
inline |
Definition at line 338 of file masternode.h.
Referenced by CMasternodeMan::CheckAndRemove(), CMasternodePing::CheckAndUpdate(), CMasternodeMan::CheckMnbAndUpdateMasternodeList(), CheckOutpoint(), masternodebroadcast(), Relay(), CMasternodeMan::SetMasternodeLastPing(), and CMasternodeMan::UpdateMasternodeList().
void CMasternodeBroadcast::Relay | ( | CConnman & | connman | ) |
Definition at line 665 of file masternode.cpp.
Referenced by CMasternodeMan::CheckMnbAndUpdateMasternodeList(), CActiveMasternode::ManageStateLocal(), masternode(), masternodebroadcast(), MasternodeList::StartAlias(), MasternodeList::StartAll(), and Update().
|
inline |
Definition at line 327 of file masternode.h.
bool CMasternodeBroadcast::Sign | ( | const CKey & | keyCollateralAddress | ) |
Definition at line 620 of file masternode.cpp.
Referenced by Create().
bool CMasternodeBroadcast::SimpleCheck | ( | int & | nDos | ) |
Definition at line 430 of file masternode.cpp.
Referenced by CMasternodeMan::CheckMnbAndUpdateMasternodeList().
bool CMasternodeBroadcast::Update | ( | CMasternode * | pmn, |
int & | nDos, | ||
CConnman & | connman | ||
) |
Definition at line 491 of file masternode.cpp.
Referenced by CMasternodeMan::CheckMnbAndUpdateMasternodeList().
CMasternodeBroadcast::ADD_SERIALIZE_METHODS |
Definition at line 324 of file masternode.h.
bool CMasternodeBroadcast::fRecovery |
Definition at line 317 of file masternode.h.
Referenced by CMasternodeMan::CheckMnbAndUpdateMasternodeList(), Update(), and CMasternode::UpdateFromNewBroadcast().