PIVX Core  5.6.99
P2P Digital Currency
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Attributes | Private Member Functions | Private Attributes | Friends | List of all members
CFinalizedBudget Class Reference

#include <finalizedbudget.h>

Collaboration diagram for CFinalizedBudget:
[legend]

Public Member Functions

 CFinalizedBudget ()
 
 CFinalizedBudget (const std::string &name, int blockstart, const std::vector< CTxBudgetPayment > &vecBudgetPaymentsIn, const uint256 &nfeetxhash)
 
bool AddOrUpdateVote (const CFinalizedBudgetVote &vote, std::string &strError)
 
UniValue GetVotesObject () const
 
void SetSynced (bool synced)
 
void SyncVotes (CNode *pfrom, bool fPartial, int &nInvCount) const
 
bool UpdateValid (int nHeight)
 
bool IsWellFormed (const CAmount &nTotalBudget)
 
bool IsValid () const
 
void SetStrInvalid (const std::string &_strInvalid)
 
std::string IsInvalidReason () const
 
std::string IsInvalidLogStr () const
 
bool IsAutoChecked () const
 
void SetAutoChecked (bool _fAutoChecked)
 
void SetProposalsStr (const std::string _strProposals)
 
std::string GetName () const
 
std::string GetProposalsStr () const
 
std::vector< uint256GetProposalsHashes () const
 
int GetBlockStart () const
 
int GetBlockEnd () const
 
const uint256GetFeeTXHash () const
 
int GetVoteCount () const
 
std::vector< uint256GetVotesHashes () const
 
bool IsPaidAlready (const uint256 &nProposalHash, const uint256 &nBlockHash, int nBlockHeight) const
 
TrxValidationStatus IsTransactionValid (const CTransaction &txNew, const uint256 &nBlockHash, int nBlockHeight) const
 
bool GetBudgetPaymentByBlock (int64_t nBlockHeight, CTxBudgetPayment &payment) const
 
bool GetPayeeAndAmount (int64_t nBlockHeight, CScript &payee, CAmount &nAmount) const
 
bool CheckProposals (const std::map< uint256, CBudgetProposal > &mapWinningProposals) const
 
CAmount GetTotalPayout () const
 
uint256 GetHash () const
 
 SERIALIZE_METHODS (CFinalizedBudget, obj)
 
bool ParseBroadcast (CDataStream &broadcast)
 
CDataStream GetBroadcast () const
 
void Relay ()
 
bool operator> (const CFinalizedBudget &other) const
 

Static Public Member Functions

static bool PtrGreater (CFinalizedBudget *a, CFinalizedBudget *b)
 

Public Attributes

int64_t nTime
 

Static Public Attributes

static constexpr unsigned int MAX_PROPOSALS_PER_CYCLE = 100
 

Protected Attributes

std::map< COutPoint, CFinalizedBudgetVotemapVotes
 
std::string strBudgetName
 
int nBlockStart
 
std::vector< CTxBudgetPaymentvecBudgetPayments
 
uint256 nFeeTXHash
 
std::string strProposals
 

Private Member Functions

bool updateExpired (int nCurrentHeight)
 
bool CheckStartEnd ()
 
bool CheckAmount (const CAmount &nTotalBudget)
 
bool CheckName ()
 

Private Attributes

bool fAutoChecked
 
bool fValid
 
std::string strInvalid
 

Friends

class CBudgetManager
 

Detailed Description

Definition at line 30 of file finalizedbudget.h.

Constructor & Destructor Documentation

◆ CFinalizedBudget() [1/2]

CFinalizedBudget::CFinalizedBudget ( )

Definition at line 11 of file finalizedbudget.cpp.

Here is the caller graph for this function:

◆ CFinalizedBudget() [2/2]

CFinalizedBudget::CFinalizedBudget ( const std::string &  name,
int  blockstart,
const std::vector< CTxBudgetPayment > &  vecBudgetPaymentsIn,
const uint256 nfeetxhash 
)

Definition at line 24 of file finalizedbudget.cpp.

Member Function Documentation

◆ AddOrUpdateVote()

bool CFinalizedBudget::AddOrUpdateVote ( const CFinalizedBudgetVote vote,
std::string &  strError 
)

Definition at line 54 of file finalizedbudget.cpp.

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

◆ CheckAmount()

bool CFinalizedBudget::CheckAmount ( const CAmount nTotalBudget)
private

Definition at line 208 of file finalizedbudget.cpp.

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

◆ CheckName()

bool CFinalizedBudget::CheckName ( )
private

Definition at line 219 of file finalizedbudget.cpp.

Here is the caller graph for this function:

◆ CheckProposals()

bool CFinalizedBudget::CheckProposals ( const std::map< uint256, CBudgetProposal > &  mapWinningProposals) const

Definition at line 103 of file finalizedbudget.cpp.

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

◆ CheckStartEnd()

bool CFinalizedBudget::CheckStartEnd ( )
private

Definition at line 182 of file finalizedbudget.cpp.

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

◆ GetBlockEnd()

int CFinalizedBudget::GetBlockEnd ( ) const
inline

Definition at line 87 of file finalizedbudget.h.

Here is the caller graph for this function:

◆ GetBlockStart()

int CFinalizedBudget::GetBlockStart ( ) const
inline

Definition at line 86 of file finalizedbudget.h.

Here is the caller graph for this function:

◆ GetBroadcast()

CDataStream CFinalizedBudget::GetBroadcast ( ) const

Definition at line 393 of file finalizedbudget.cpp.

◆ GetBudgetPaymentByBlock()

bool CFinalizedBudget::GetBudgetPaymentByBlock ( int64_t  nBlockHeight,
CTxBudgetPayment payment 
) const

Definition at line 373 of file finalizedbudget.cpp.

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

◆ GetFeeTXHash()

const uint256& CFinalizedBudget::GetFeeTXHash ( ) const
inline

Definition at line 88 of file finalizedbudget.h.

Here is the caller graph for this function:

◆ GetHash()

uint256 CFinalizedBudget::GetHash ( ) const
inline

Definition at line 101 of file finalizedbudget.h.

Here is the caller graph for this function:

◆ GetName()

std::string CFinalizedBudget::GetName ( ) const
inline

Definition at line 83 of file finalizedbudget.h.

Here is the caller graph for this function:

◆ GetPayeeAndAmount()

bool CFinalizedBudget::GetPayeeAndAmount ( int64_t  nBlockHeight,
CScript payee,
CAmount nAmount 
) const

Definition at line 382 of file finalizedbudget.cpp.

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

◆ GetProposalsHashes()

std::vector< uint256 > CFinalizedBudget::GetProposalsHashes ( ) const

Definition at line 162 of file finalizedbudget.cpp.

Here is the caller graph for this function:

◆ GetProposalsStr()

std::string CFinalizedBudget::GetProposalsStr ( ) const
inline

Definition at line 84 of file finalizedbudget.h.

Here is the caller graph for this function:

◆ GetTotalPayout()

CAmount CFinalizedBudget::GetTotalPayout ( ) const

Definition at line 151 of file finalizedbudget.cpp.

Here is the caller graph for this function:

◆ GetVoteCount()

int CFinalizedBudget::GetVoteCount ( ) const

Definition at line 259 of file finalizedbudget.cpp.

Here is the caller graph for this function:

◆ GetVotesHashes()

std::vector< uint256 > CFinalizedBudget::GetVotesHashes ( ) const

Definition at line 270 of file finalizedbudget.cpp.

◆ GetVotesObject()

UniValue CFinalizedBudget::GetVotesObject ( ) const

Definition at line 81 of file finalizedbudget.cpp.

Here is the call graph for this function:

◆ IsAutoChecked()

bool CFinalizedBudget::IsAutoChecked ( ) const
inline

Definition at line 78 of file finalizedbudget.h.

◆ IsInvalidLogStr()

std::string CFinalizedBudget::IsInvalidLogStr ( ) const
inline

Definition at line 76 of file finalizedbudget.h.

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

◆ IsInvalidReason()

std::string CFinalizedBudget::IsInvalidReason ( ) const
inline

Definition at line 75 of file finalizedbudget.h.

Here is the caller graph for this function:

◆ IsPaidAlready()

bool CFinalizedBudget::IsPaidAlready ( const uint256 nProposalHash,
const uint256 nBlockHash,
int  nBlockHeight 
) const

Definition at line 279 of file finalizedbudget.cpp.

Here is the caller graph for this function:

◆ IsTransactionValid()

TrxValidationStatus CFinalizedBudget::IsTransactionValid ( const CTransaction txNew,
const uint256 nBlockHash,
int  nBlockHeight 
) const

Definition at line 322 of file finalizedbudget.cpp.

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

◆ IsValid()

bool CFinalizedBudget::IsValid ( ) const
inline

Definition at line 73 of file finalizedbudget.h.

Here is the caller graph for this function:

◆ IsWellFormed()

bool CFinalizedBudget::IsWellFormed ( const CAmount nTotalBudget)

Definition at line 241 of file finalizedbudget.cpp.

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

◆ operator>()

bool CFinalizedBudget::operator> ( const CFinalizedBudget other) const

Definition at line 405 of file finalizedbudget.cpp.

◆ ParseBroadcast()

bool CFinalizedBudget::ParseBroadcast ( CDataStream broadcast)

Definition at line 40 of file finalizedbudget.cpp.

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

◆ PtrGreater()

static bool CFinalizedBudget::PtrGreater ( CFinalizedBudget a,
CFinalizedBudget b 
)
inlinestatic

Definition at line 131 of file finalizedbudget.h.

Here is the caller graph for this function:

◆ Relay()

void CFinalizedBudget::Relay ( )

Definition at line 415 of file finalizedbudget.cpp.

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

◆ SERIALIZE_METHODS()

CFinalizedBudget::SERIALIZE_METHODS ( CFinalizedBudget  ,
obj   
)
inline

Definition at line 111 of file finalizedbudget.h.

◆ SetAutoChecked()

void CFinalizedBudget::SetAutoChecked ( bool  _fAutoChecked)
inline

Definition at line 79 of file finalizedbudget.h.

◆ SetProposalsStr()

void CFinalizedBudget::SetProposalsStr ( const std::string  _strProposals)
inline

Definition at line 81 of file finalizedbudget.h.

Here is the caller graph for this function:

◆ SetStrInvalid()

void CFinalizedBudget::SetStrInvalid ( const std::string &  _strInvalid)
inline

Definition at line 74 of file finalizedbudget.h.

Here is the caller graph for this function:

◆ SetSynced()

void CFinalizedBudget::SetSynced ( bool  synced)

Definition at line 91 of file finalizedbudget.cpp.

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

◆ SyncVotes()

void CFinalizedBudget::SyncVotes ( CNode pfrom,
bool  fPartial,
int &  nInvCount 
) const

Definition at line 171 of file finalizedbudget.cpp.

Here is the call graph for this function:

◆ updateExpired()

bool CFinalizedBudget::updateExpired ( int  nCurrentHeight)
private

Definition at line 229 of file finalizedbudget.cpp.

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

◆ UpdateValid()

bool CFinalizedBudget::UpdateValid ( int  nHeight)

Definition at line 246 of file finalizedbudget.cpp.

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

Friends And Related Function Documentation

◆ CBudgetManager

friend class CBudgetManager
friend

Definition at line 33 of file finalizedbudget.h.

Member Data Documentation

◆ fAutoChecked

bool CFinalizedBudget::fAutoChecked
private

Definition at line 35 of file finalizedbudget.h.

◆ fValid

bool CFinalizedBudget::fValid
private

Definition at line 36 of file finalizedbudget.h.

◆ mapVotes

std::map<COutPoint, CFinalizedBudgetVote> CFinalizedBudget::mapVotes
protected

Definition at line 46 of file finalizedbudget.h.

◆ MAX_PROPOSALS_PER_CYCLE

constexpr unsigned int CFinalizedBudget::MAX_PROPOSALS_PER_CYCLE = 100
staticconstexpr

Definition at line 54 of file finalizedbudget.h.

◆ nBlockStart

int CFinalizedBudget::nBlockStart
protected

Definition at line 48 of file finalizedbudget.h.

◆ nFeeTXHash

uint256 CFinalizedBudget::nFeeTXHash
protected

Definition at line 50 of file finalizedbudget.h.

◆ nTime

int64_t CFinalizedBudget::nTime

Definition at line 57 of file finalizedbudget.h.

◆ strBudgetName

std::string CFinalizedBudget::strBudgetName
protected

Definition at line 47 of file finalizedbudget.h.

◆ strInvalid

std::string CFinalizedBudget::strInvalid
private

Definition at line 37 of file finalizedbudget.h.

◆ strProposals

std::string CFinalizedBudget::strProposals
protected

Definition at line 51 of file finalizedbudget.h.

◆ vecBudgetPayments

std::vector<CTxBudgetPayment> CFinalizedBudget::vecBudgetPayments
protected

Definition at line 49 of file finalizedbudget.h.


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