18 LogPrint(
"masternode",
"CActiveMasternode::ManageState -- Start\n");
20 LogPrint(
"masternode",
"CActiveMasternode::ManageState -- Not a masternode, returning\n");
60 default:
return "UNKNOWN";
72 default:
return "Unknown";
99 LogPrint(
"masternode",
"CActiveMasternode::SendMasternodePing -- %s: masternode ping service is disabled, skipping...\n",
GetStateString());
115 LogPrintf(
"CActiveMasternode::SendMasternodePing -- ERROR: Couldn't sign Masternode Ping\n");
121 LogPrintf(
"CActiveMasternode::SendMasternodePing -- Too early to send Masternode Ping\n");
149 strNotCapableReason =
"Masternode must accept connections from outside. Make sure listen configuration option is not overwritten by some another parameter.";
168 strNotCapableReason =
"Can't detect valid external address. Will retry when there are some connections available.";
176 strNotCapableReason =
"Can't detect valid external address. Please consider using the externalip configuration option if problem persists. Make sure to use IPv4 address only.";
238 LogPrint(
"masternode",
"CActiveMasternode::ManageStateRemote -- Start status = %s, type = %s, pinger enabled = %d, pubKeyMasternode.GetID() = %s\n",
252 strNotCapableReason =
"Broadcasted IP doesn't match our external address. Make sure you issued a new broadcast if IP of this masternode changed recently.";
263 LogPrintf(
"CActiveMasternode::ManageStateRemote -- STARTED!\n");
290 if(nPrevoutAge <
Params().GetConsensus().nMasternodeMinimumConfirmations){
303 std::string strError;
321 LogPrintf(
"CActiveMasternode::ManageStateLocal -- Update Masternode List\n");
CNode * ConnectNode(CAddress addrConnect, const char *pszDest=NULL, bool fConnectToMasternode=false)
uint32_t nSentinelVersion
bool GetLocal(CService &addr, const CNetAddr *paddrPeer)
CMasternodeSync masternodeSync
CActiveMasternode activeMasternode
void Relay(CConnman &connman)
int GetUTXOHeight(const COutPoint &outpoint)
std::string GetStatus() const
void ManageStateInitial(CConnman &connman)
std::string GetStateString() const
int64_t nSentinelPingTime
void CheckMasternode(const CPubKey &pubKeyMasternode, bool fForce)
CCriticalSection cs_wallet
bool IsMasternodePingedWithin(const COutPoint &outpoint, int nSeconds, int64_t nTimeToCheckAt=-1)
const Consensus::Params & GetConsensus() const
static const CAmount COIN
void ManageStateLocal(CConnman &connman)
static const int ACTIVE_MASTERNODE_SYNC_IN_PROCESS
std::string ToString(bool fUseGetnameinfo=true) const
CKeyID GetID() const
Get the KeyID of this public key (hash of its serialization)
void SetMasternodeLastPing(const COutPoint &outpoint, const CMasternodePing &mnp)
int GetDefaultPort() const
unsigned short GetPort() const
static const int MASTERNODE_WATCHDOG_MAX_SECONDS
CAmount GetBalance() const
bool UpdateSentinelPing(int version)
int nMasternodeMinimumConfirmations
bool Sign(const CKey &keyMasternode, const CPubKey &pubKeyMasternode)
static int LogPrint(const char *category, const char *format)
static const int ACTIVE_MASTERNODE_INITIAL
bool GetMasternodeInfo(const COutPoint &outpoint, masternode_info_t &mnInfoRet)
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.
bool IsLocked(bool fForMixing=false) const
std::string ToString() const
std::string GetTypeString() const
static const int ACTIVE_MASTERNODE_STARTED
static const int MASTERNODE_MIN_MNP_SECONDS
void ManageState(CConnman &connman)
Manage state of active Masternode.
const CChainParams & Params()
int GetUTXOConfirmations(const COutPoint &outpoint)
std::string strNotCapableReason
static const int PROTOCOL_VERSION
static std::string StateToString(int nStateIn)
int64_t GetAdjustedTime()
bool IsBlockchainSynced()
static const int ACTIVE_MASTERNODE_INPUT_TOO_NEW
static bool IsValidStateForAutoStart(int nActiveStateIn)
masternode_type_enum_t eType
void NotifyMasternodeUpdates(CConnman &connman)
bool GetMasternodeOutpointAndKeys(COutPoint &outpointRet, CPubKey &pubKeyRet, CKey &keyRet, std::string strTxHash="", std::string strOutputIndex="")
Get 1000DASH output and keys which can be used for the Masternode.
bool Has(const COutPoint &outpoint)
static const std::string MAIN
bool ForEachNodeContinueIf(const Condition &cond, Callable &&func)
bool SendMasternodePing(CConnman &connman)
Ping Masternode.
void LockCoin(COutPoint &output)
void Relay(CConnman &connman)
void UpdateMasternodeList(CMasternodeBroadcast mnb, CConnman &connman)
Update masternode list and maps using provided CMasternodeBroadcast.
static constexpr const CAllNodes AllNodes
std::string ToStringShort() const
static const int ACTIVE_MASTERNODE_NOT_CAPABLE
uint256 nCollateralMinConfBlockHash
std::string _(const char *psz)
uint32_t nSentinelVersion
static const std::string REGTEST