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

#include <masternode-budget.h>

Collaboration diagram for CBudgetManager:
[legend]

Public Member Functions

 CBudgetManager ()
 
void ClearSeen ()
 
int sizeFinalized ()
 
int sizeProposals ()
 
void ResetSync ()
 
void MarkSynced ()
 
void Sync (CNode *node, uint256 nProp, bool fPartial=false)
 
void Calculate ()
 
void ProcessMessage (CNode *pfrom, std::string &strCommand, CDataStream &vRecv)
 
void NewBlock ()
 
CBudgetProposalFindProposal (const std::string &strProposalName)
 
CBudgetProposalFindProposal (uint256 nHash)
 
CFinalizedBudgetFindFinalizedBudget (uint256 nHash)
 
std::pair< std::string, std::string > GetVotes (std::string strProposalName)
 
CAmount GetTotalBudget (int nHeight)
 
std::vector< CBudgetProposal * > GetBudget ()
 
std::vector< CBudgetProposal * > GetAllProposals ()
 
std::vector< CFinalizedBudget * > GetFinalizedBudgets ()
 
bool IsBudgetPaymentBlock (int nBlockHeight)
 
bool AddProposal (CBudgetProposal &budgetProposal)
 
bool AddFinalizedBudget (CFinalizedBudget &finalizedBudget)
 
void SubmitFinalBudget ()
 
bool UpdateProposal (CBudgetVote &vote, CNode *pfrom, std::string &strError)
 
bool UpdateFinalizedBudget (CFinalizedBudgetVote &vote, CNode *pfrom, std::string &strError)
 
bool PropExists (uint256 nHash)
 
bool IsTransactionValid (const CTransaction &txNew, int nBlockHeight)
 
std::string GetRequiredPaymentsString (int nBlockHeight)
 
bool FillBlockPayee (CMutableTransaction &txNew, CAmount nFees, bool fProofOfStake)
 
void CheckOrphanVotes ()
 
void Clear ()
 
void CheckAndRemove ()
 
std::string ToString () const
 
template<typename Stream , typename Operation >
void SerializationOp (Stream &s, Operation ser_action, int nType, int nVersion)
 

Public Attributes

RecursiveMutex cs
 
std::map< uint256, CBudgetProposalmapProposals
 
std::map< uint256, CFinalizedBudgetmapFinalizedBudgets
 
std::map< uint256, CBudgetProposalBroadcastmapSeenMasternodeBudgetProposals
 
std::map< uint256, CBudgetVotemapSeenMasternodeBudgetVotes
 
std::map< uint256, CBudgetVotemapOrphanMasternodeBudgetVotes
 
std::map< uint256, CFinalizedBudgetBroadcastmapSeenFinalizedBudgets
 
std::map< uint256, CFinalizedBudgetVotemapSeenFinalizedBudgetVotes
 
std::map< uint256, CFinalizedBudgetVotemapOrphanFinalizedBudgetVotes
 
 ADD_SERIALIZE_METHODS
 

Private Attributes

std::map< uint256, uint256mapCollateralTxids
 

Detailed Description

Definition at line 172 of file masternode-budget.h.

Constructor & Destructor Documentation

◆ CBudgetManager()

CBudgetManager::CBudgetManager ( )
inline

Definition at line 194 of file masternode-budget.h.

Member Function Documentation

◆ AddFinalizedBudget()

bool CBudgetManager::AddFinalizedBudget ( CFinalizedBudget finalizedBudget)

Definition at line 399 of file masternode-budget.cpp.

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

◆ AddProposal()

bool CBudgetManager::AddProposal ( CBudgetProposal budgetProposal)

Definition at line 412 of file masternode-budget.cpp.

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

◆ Calculate()

void CBudgetManager::Calculate ( )

◆ CheckAndRemove()

void CBudgetManager::CheckAndRemove ( )

Definition at line 430 of file masternode-budget.cpp.

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

◆ CheckOrphanVotes()

void CBudgetManager::CheckOrphanVotes ( )

Definition at line 98 of file masternode-budget.cpp.

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

◆ Clear()

void CBudgetManager::Clear ( )
inline

Definition at line 240 of file masternode-budget.h.

◆ ClearSeen()

void CBudgetManager::ClearSeen ( )
inline

Definition at line 200 of file masternode-budget.h.

◆ FillBlockPayee()

bool CBudgetManager::FillBlockPayee ( CMutableTransaction txNew,
CAmount  nFees,
bool  fProofOfStake 
)

Definition at line 490 of file masternode-budget.cpp.

Here is the call graph for this function:

◆ FindFinalizedBudget()

CFinalizedBudget * CBudgetManager::FindFinalizedBudget ( uint256  nHash)

Definition at line 554 of file masternode-budget.cpp.

Here is the caller graph for this function:

◆ FindProposal() [1/2]

CBudgetProposal * CBudgetManager::FindProposal ( const std::string &  strProposalName)

Definition at line 562 of file masternode-budget.cpp.

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

◆ FindProposal() [2/2]

CBudgetProposal * CBudgetManager::FindProposal ( uint256  nHash)

Definition at line 583 of file masternode-budget.cpp.

◆ GetAllProposals()

std::vector< CBudgetProposal * > CBudgetManager::GetAllProposals ( )

Definition at line 669 of file masternode-budget.cpp.

Here is the caller graph for this function:

◆ GetBudget()

std::vector< CBudgetProposal * > CBudgetManager::GetBudget ( )

Definition at line 701 of file masternode-budget.cpp.

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

◆ GetFinalizedBudgets()

std::vector< CFinalizedBudget * > CBudgetManager::GetFinalizedBudgets ( )

Definition at line 780 of file masternode-budget.cpp.

Here is the call graph for this function:

◆ GetRequiredPaymentsString()

std::string CBudgetManager::GetRequiredPaymentsString ( int  nBlockHeight)

Definition at line 807 of file masternode-budget.cpp.

Here is the call graph for this function:

◆ GetTotalBudget()

CAmount CBudgetManager::GetTotalBudget ( int  nHeight)

Definition at line 836 of file masternode-budget.cpp.

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

◆ GetVotes()

std::pair<std::string, std::string> CBudgetManager::GetVotes ( std::string  strProposalName)

◆ IsBudgetPaymentBlock()

bool CBudgetManager::IsBudgetPaymentBlock ( int  nBlockHeight)

Definition at line 593 of file masternode-budget.cpp.

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

◆ IsTransactionValid()

bool CBudgetManager::IsTransactionValid ( const CTransaction txNew,
int  nBlockHeight 
)

Definition at line 619 of file masternode-budget.cpp.

Here is the call graph for this function:

◆ MarkSynced()

void CBudgetManager::MarkSynced ( )

Definition at line 1210 of file masternode-budget.cpp.

Here is the call graph for this function:

◆ NewBlock()

void CBudgetManager::NewBlock ( )

Definition at line 876 of file masternode-budget.cpp.

Here is the call graph for this function:

◆ ProcessMessage()

void CBudgetManager::ProcessMessage ( CNode pfrom,
std::string &  strCommand,
CDataStream vRecv 
)

Definition at line 988 of file masternode-budget.cpp.

Here is the call graph for this function:

◆ PropExists()

bool CBudgetManager::PropExists ( uint256  nHash)

Definition at line 1169 of file masternode-budget.cpp.

◆ ResetSync()

void CBudgetManager::ResetSync ( )

Definition at line 1176 of file masternode-budget.cpp.

Here is the call graph for this function:

◆ SerializationOp()

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

Definition at line 261 of file masternode-budget.h.

◆ sizeFinalized()

int CBudgetManager::sizeFinalized ( )
inline

Definition at line 208 of file masternode-budget.h.

◆ sizeProposals()

int CBudgetManager::sizeProposals ( )
inline

Definition at line 209 of file masternode-budget.h.

◆ SubmitFinalBudget()

void CBudgetManager::SubmitFinalBudget ( )

Definition at line 125 of file masternode-budget.cpp.

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

◆ Sync()

void CBudgetManager::Sync ( CNode node,
uint256  nProp,
bool  fPartial = false 
)

Definition at line 1250 of file masternode-budget.cpp.

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

◆ ToString()

std::string CBudgetManager::ToString ( ) const

Definition at line 2166 of file masternode-budget.cpp.

◆ UpdateFinalizedBudget()

bool CBudgetManager::UpdateFinalizedBudget ( CFinalizedBudgetVote vote,
CNode pfrom,
std::string &  strError 
)

Definition at line 1347 of file masternode-budget.cpp.

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

◆ UpdateProposal()

bool CBudgetManager::UpdateProposal ( CBudgetVote vote,
CNode pfrom,
std::string &  strError 
)

Definition at line 1320 of file masternode-budget.cpp.

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

Member Data Documentation

◆ ADD_SERIALIZE_METHODS

CBudgetManager::ADD_SERIALIZE_METHODS

Definition at line 258 of file masternode-budget.h.

◆ cs

RecursiveMutex CBudgetManager::cs
mutable

Definition at line 181 of file masternode-budget.h.

◆ mapCollateralTxids

std::map<uint256, uint256> CBudgetManager::mapCollateralTxids
private

Definition at line 177 of file masternode-budget.h.

◆ mapFinalizedBudgets

std::map<uint256, CFinalizedBudget> CBudgetManager::mapFinalizedBudgets

Definition at line 185 of file masternode-budget.h.

◆ mapOrphanFinalizedBudgetVotes

std::map<uint256, CFinalizedBudgetVote> CBudgetManager::mapOrphanFinalizedBudgetVotes

Definition at line 192 of file masternode-budget.h.

◆ mapOrphanMasternodeBudgetVotes

std::map<uint256, CBudgetVote> CBudgetManager::mapOrphanMasternodeBudgetVotes

Definition at line 189 of file masternode-budget.h.

◆ mapProposals

std::map<uint256, CBudgetProposal> CBudgetManager::mapProposals

Definition at line 184 of file masternode-budget.h.

◆ mapSeenFinalizedBudgets

std::map<uint256, CFinalizedBudgetBroadcast> CBudgetManager::mapSeenFinalizedBudgets

Definition at line 190 of file masternode-budget.h.

◆ mapSeenFinalizedBudgetVotes

std::map<uint256, CFinalizedBudgetVote> CBudgetManager::mapSeenFinalizedBudgetVotes

Definition at line 191 of file masternode-budget.h.

◆ mapSeenMasternodeBudgetProposals

std::map<uint256, CBudgetProposalBroadcast> CBudgetManager::mapSeenMasternodeBudgetProposals

Definition at line 187 of file masternode-budget.h.

◆ mapSeenMasternodeBudgetVotes

std::map<uint256, CBudgetVote> CBudgetManager::mapSeenMasternodeBudgetVotes

Definition at line 188 of file masternode-budget.h.


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