PRCYCoin  2.0.0.7rc1
P2P Digital Currency
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
CMasternodeBroadcast Class Reference

#include <masternode.h>

Inheritance diagram for CMasternodeBroadcast:
[legend]
Collaboration diagram for CMasternodeBroadcast:
[legend]

Public Member Functions

 CMasternodeBroadcast ()
 
 CMasternodeBroadcast (CService newAddr, CTxIn newVin, CPubKey newPubkey, CPubKey newPubkey2, int protocolVersionIn)
 
 CMasternodeBroadcast (const CMasternode &mn)
 
bool CheckAndUpdate (int &nDoS)
 
bool CheckInputsAndAdd (int &nDos)
 
bool Sign (CKey &keyCollateralAddress)
 
bool VerifySignature ()
 
void Relay ()
 
std::string GetStrMessage ()
 
template<typename Stream , typename Operation >
void SerializationOp (Stream &s, Operation ser_action, int nType, int nVersion)
 
uint256 GetHash ()
 
- Public Member Functions inherited from CMasternode
 CMasternode ()
 
 CMasternode (const CMasternode &other)
 
 CMasternode (const CMasternodeBroadcast &mnb)
 
void swap (CMasternode &first, CMasternode &second)
 
CMasternodeoperator= (CMasternode from)
 
uint256 CalculateScore (int mod=1, int64_t nBlockHeight=0)
 
template<typename Stream , typename Operation >
void SerializationOp (Stream &s, Operation ser_action, int nType, int nVersion)
 
int64_t SecondsSincePayment ()
 
bool UpdateFromNewBroadcast (CMasternodeBroadcast &mnb)
 
void Check (bool forceCheck=false)
 
bool IsBroadcastedWithin (int seconds)
 
bool IsPingedWithin (int seconds, int64_t now=-1)
 
void Disable ()
 
bool IsEnabled ()
 
int GetMasternodeInputAge ()
 
std::string GetStatus ()
 
std::string Status ()
 
int64_t GetLastPaid ()
 
bool IsValidNetAddr ()
 
bool IsInputAssociatedWithPubkey (CTxIn &vin, CPubKey &pubkey) const
 Is the input associated with collateral public key? (and there is 5000 PRCY - checking if valid masternode) More...
 

Static Public Member Functions

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. 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 bool CheckDefaultPort (CService service, std::string &strErrorRet, const std::string &strContext)
 

Public Attributes

 ADD_SERIALIZE_METHODS
 
- Public Attributes inherited from CMasternode
CTxIn vin
 
CService addr
 
CPubKey pubKeyCollateralAddress
 
CPubKey pubKeyMasternode
 
CPubKey pubKeyCollateralAddress1
 
CPubKey pubKeyMasternode1
 
std::vector< unsigned char > sig
 
int activeState
 
int64_t sigTime
 
int cacheInputAge
 
int cacheInputAgeBlock
 
bool unitTest
 
bool allowFreeTx
 
int protocolVersion
 
int nActiveState
 
int64_t nLastDsq
 
int nScanningErrorCount
 
int nLastScanningErrorBlockHeight
 
CMasternodePing lastPing
 
 ADD_SERIALIZE_METHODS
 

Additional Inherited Members

- Public Types inherited from CMasternode
enum  state {
  MASTERNODE_PRE_ENABLED, MASTERNODE_ENABLED, MASTERNODE_EXPIRED, MASTERNODE_OUTPOINT_SPENT,
  MASTERNODE_REMOVE, MASTERNODE_WATCHDOG_EXPIRED, MASTERNODE_POSE_BAN, MASTERNODE_VIN_SPENT,
  MASTERNODE_POS_ERROR
}
 

Detailed Description

Definition at line 292 of file masternode.h.

Constructor & Destructor Documentation

◆ CMasternodeBroadcast() [1/3]

CMasternodeBroadcast::CMasternodeBroadcast ( )

Definition at line 365 of file masternode.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CMasternodeBroadcast() [2/3]

CMasternodeBroadcast::CMasternodeBroadcast ( CService  newAddr,
CTxIn  newVin,
CPubKey  newPubkey,
CPubKey  newPubkey2,
int  protocolVersionIn 
)

Definition at line 385 of file masternode.cpp.

Here is the call graph for this function:

◆ CMasternodeBroadcast() [3/3]

CMasternodeBroadcast::CMasternodeBroadcast ( const CMasternode mn)

Definition at line 405 of file masternode.cpp.

Member Function Documentation

◆ CheckAndUpdate()

bool CMasternodeBroadcast::CheckAndUpdate ( int &  nDoS)

Definition at line 519 of file masternode.cpp.

Here is the call graph for this function:

◆ CheckDefaultPort()

bool CMasternodeBroadcast::CheckDefaultPort ( CService  service,
std::string &  strErrorRet,
const std::string &  strContext 
)
static

Definition at line 505 of file masternode.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CheckInputsAndAdd()

bool CMasternodeBroadcast::CheckInputsAndAdd ( int &  nDos)

Definition at line 612 of file masternode.cpp.

Here is the call graph for this function:

◆ Create() [1/2]

bool CMasternodeBroadcast::Create ( CTxIn  vin,
CService  service,
CKey  keyCollateralAddressNew,
CPubKey  pubKeyCollateralAddressNew,
CKey  keyMasternodeNew,
CPubKey  pubKeyMasternodeNew,
std::string &  strErrorRet,
CMasternodeBroadcast mnbRet 
)
static

Create Masternode broadcast, needs to be relayed manually after that.

Definition at line 467 of file masternode.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Create() [2/2]

bool CMasternodeBroadcast::Create ( std::string  strService,
std::string  strKey,
std::string  strTxHash,
std::string  strOutputIndex,
std::string &  strErrorRet,
CMasternodeBroadcast mnbRet,
bool  fOffline = false 
)
static

Definition at line 425 of file masternode.cpp.

Here is the call graph for this function:

◆ GetHash()

uint256 CMasternodeBroadcast::GetHash ( )
inline

Definition at line 322 of file masternode.h.

Here is the caller graph for this function:

◆ GetStrMessage()

std::string CMasternodeBroadcast::GetStrMessage ( )

Definition at line 730 of file masternode.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Relay()

void CMasternodeBroadcast::Relay ( )

Definition at line 694 of file masternode.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SerializationOp()

template<typename Stream , typename Operation >
void CMasternodeBroadcast::SerializationOp ( Stream &  s,
Operation  ser_action,
int  nType,
int  nVersion 
)
inline

Definition at line 309 of file masternode.h.

◆ Sign()

bool CMasternodeBroadcast::Sign ( CKey keyCollateralAddress)

Definition at line 700 of file masternode.cpp.

Here is the call graph for this function:

◆ VerifySignature()

bool CMasternodeBroadcast::VerifySignature ( )

Definition at line 720 of file masternode.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ ADD_SERIALIZE_METHODS

CMasternodeBroadcast::ADD_SERIALIZE_METHODS

Definition at line 306 of file masternode.h.


The documentation for this class was generated from the following files: