6 #ifndef PIVX_ACTIVEMASTERNODE_H
7 #define PIVX_ACTIVEMASTERNODE_H
19 #define ACTIVE_MASTERNODE_INITIAL 0
20 #define ACTIVE_MASTERNODE_SYNC_IN_PROCESS 1
21 #define ACTIVE_MASTERNODE_NOT_CAPABLE 3
22 #define ACTIVE_MASTERNODE_STARTED 4
CActiveDeterministicMasternodeManager * activeMasternodeManager
OperationResult initMasternode(const std::string &strMasterNodePrivKey, const std::string &strMasterNodeAddr, bool isFromInit)
bool GetActiveDMNKeys(CBLSSecretKey &key, CTxIn &vin)
#define ACTIVE_MASTERNODE_INITIAL
bool GetActiveMasternodeKeys(CTxIn &vin, Optional< CKey > &key, CBLSSecretKey &blsKey)
const uint256 GetProTx() const
masternode_state_t GetState() const
void UpdatedBlockTip(const CBlockIndex *pindexNew, const CBlockIndex *pindexFork, bool fInitialDownload) override
Notifies listeners when the block chain tip advances.
static bool IsValidNetAddr(const CService &addrIn)
std::string GetStatus() const
@ MASTERNODE_WAITING_FOR_PROTX
@ MASTERNODE_OPERATOR_KEY_CHANGED
@ MASTERNODE_PROTX_IP_CHANGED
void Reset(masternode_state_t _state, const CBlockIndex *pindexTip)
OperationResult SetOperatorKey(const std::string &strMNOperatorPrivKey)
~CActiveDeterministicMasternodeManager() override=default
const CBLSSecretKey * OperatorKey() const
const CActiveMasternodeInfo * GetInfo() const
void Init(const CBlockIndex *pindexTip)
CActiveMasternodeInfo info
OperationResult GetOperatorKey(CBLSSecretKey &key, CDeterministicMNCPtr &dmn) const
CActiveMasternode()=default
bool EnableHotColdMasterNode(CTxIn &vin, CService &addr)
Enable cold wallet mode (run a Masternode with no funds)
void ManageStatus()
Manage status of main Masternode.
std::string GetStatusMessage() const
void GetKeys(CKey &privKeyMasternode, CPubKey &pubKeyMasternode) const
std::string notCapableReason
bool SendMasternodePing(std::string &errorMessage)
Ping Masternode.
The block chain is a tree shaped structure starting with the genesis block at the root,...
An encapsulated private key.
An encapsulated public key.
A combination of a network address (CNetAddr) and a (TCP) port.
An input of a transaction.
Implement this to subscribe to events generated in validation.
std::shared_ptr< const CDeterministicMN > CDeterministicMNCPtr
boost::optional< T > Optional
Substitute for C++17 std::optional.
CBLSSecretKey keyOperator
CBLSPublicKey pubKeyOperator
const uint256 UINT256_ZERO
constant uint256 instances