 |
PRCYCoin
2.0.0.7rc1
P2P Digital Currency
|
Go to the documentation of this file.
18 #define MASTERNODE_MIN_CONFIRMATIONS 15
19 #define MASTERNODE_MIN_MNP_SECONDS (10 * 60)
20 #define MASTERNODE_MIN_MNB_SECONDS (5 * 60)
21 #define MASTERNODE_PING_SECONDS (5 * 60)
22 #define MASTERNODE_EXPIRATION_SECONDS (120 * 60)
23 #define MASTERNODE_REMOVAL_SECONDS (130 * 60)
24 #define MASTERNODE_CHECK_SECONDS 5
53 template <
typename Stream,
typename Operation>
54 inline void SerializationOp(Stream& s, Operation ser_action,
int nType,
int nVersion)
62 bool CheckAndUpdate(
int& nDos,
bool fRequireEnabled =
true,
bool fCheckSigTimeOnly =
false);
133 std::vector<unsigned char>
sig;
184 return a.
vin ==
b.vin;
188 return !(a.
vin ==
b.vin);
195 template <
typename Stream,
typename Operation>
222 void Check(
bool forceCheck =
false);
253 if (!pindex)
return 0;
269 std::string strStatus =
"ACTIVE";
301 bool Sign(
CKey& keyCollateralAddress);
308 template <
typename Stream,
typename Operation>
332 static bool Create(std::string strService, std::string strKey, std::string strTxHash, std::string strOutputIndex, std::string& strErrorRet,
CMasternodeBroadcast& mnbRet,
bool fOffline =
false);
An input of a transaction.
A combination of a network address (CNetAddr) and a (TCP) port.
bool Sign(CKey &keyCollateralAddress)
CPubKey pubKeyCollateralAddress1
static bool CheckDefaultPort(CService service, std::string &strErrorRet, const std::string &strContext)
friend bool operator!=(const CMasternode &a, const CMasternode &b)
@ MASTERNODE_WATCHDOG_EXPIRED
static bool Create(CTxIn vin, CService service, CKey keyCollateralAddressNew, CPubKey pubKeyCollateralAddressNew, CKey keyMasternodeNew, CPubKey pubKeyMasternodeNew, std::string &strErrorRet, CMasternodeBroadcast &mnbRet)
Create Masternode broadcast, needs to be relayed manually after that.
void SerializationOp(Stream &s, Operation ser_action, int nType, int nVersion)
CChain chainActive
The currently-connected chain of blocks.
bool CheckAndUpdate(int &nDos, bool fRequireEnabled=true, bool fCheckSigTimeOnly=false)
bool Sign(CKey &keyMasternode, CPubKey &pubKeyMasternode)
int nHeight
height of the entry in the chain. The genesis block has height 0
bool CheckAndUpdate(int &nDoS)
bool UpdateFromNewBroadcast(CMasternodeBroadcast &mnb)
void SerializationOp(Stream &s, Operation ser_action, int nType, int nVersion)
int64_t SecondsSincePayment()
CMasternodePing & operator=(CMasternodePing from)
friend bool operator==(const CMasternodePing &a, const CMasternodePing &b)
std::map< int64_t, uint256 > mapCacheBlockHashes
friend bool operator==(const CMasternode &a, const CMasternode &b)
int GetMasternodeInputAge()
RecursiveMutex cs_main
Global state.
CPubKey pubKeyMasternode1
void swap(CMasternode &first, CMasternode &second)
bool GetBlockHash(uint256 &hash, int nBlockHeight)
bool CheckInputsAndAdd(int &nDos)
uint256 CalculateScore(int mod=1, int64_t nBlockHeight=0)
int GetInputAge(CTxIn &vin)
friend bool operator!=(const CMasternodePing &a, const CMasternodePing &b)
256-bit unsigned big integer.
CMasternode & operator=(CMasternode from)
std::vector< unsigned char > sig
An encapsulated public key.
int64_t GetAdjustedTime()
int nLastScanningErrorBlockHeight
An encapsulated private key.
@ MASTERNODE_OUTPOINT_SPENT
A writer stream (for serialization) that computes a 256-bit hash.
bool IsPingedWithin(int seconds, int64_t now=-1)
void SerializationOp(Stream &s, Operation ser_action, int nType, int nVersion)
bool IsBroadcastedWithin(int seconds)
CBlockIndex * Tip(bool fProofOfStake=false) const
Returns the index entry for the tip of this chain, or NULL if none.
std::vector< unsigned char > vchSig
The block chain is a tree shaped structure starting with the genesis block at the root,...
std::string GetStrMessage()
void swap(CMasternodePing &first, CMasternodePing &second)
void Check(bool forceCheck=false)
bool VerifySignature(CPubKey &pubKeyMasternode, int &nDos)
CPubKey pubKeyCollateralAddress
bool IsInputAssociatedWithPubkey(CTxIn &vin, CPubKey &pubkey) const
Is the input associated with collateral public key? (and there is 5000 PRCY - checking if valid maste...