6 #ifndef PIVX_BUDGET_FINALIZEDBUDGET_H
7 #define PIVX_BUDGET_FINALIZEDBUDGET_H
17 static std::map<uint256, std::pair<uint256,int> > mapPayment_History;
46 std::map<COutPoint, CFinalizedBudgetVote>
mapVotes;
60 CFinalizedBudget(
const std::string&
name,
int blockstart,
const std::vector<CTxBudgetPayment>& vecBudgetPaymentsIn,
const uint256& nfeetxhash);
97 bool CheckProposals(
const std::map<uint256, CBudgetProposal>& mapWinningProposals)
const;
int64_t CAmount
Amount in PIV (Can be negative)
arith_uint256 UintToArith256(const uint256 &a)
bool GetPayeeAndAmount(int64_t nBlockHeight, CScript &payee, CAmount &nAmount) const
std::string IsInvalidLogStr() const
static constexpr unsigned int MAX_PROPOSALS_PER_CYCLE
void SetAutoChecked(bool _fAutoChecked)
static bool PtrGreater(CFinalizedBudget *a, CFinalizedBudget *b)
std::string GetProposalsStr() const
std::string IsInvalidReason() const
bool GetBudgetPaymentByBlock(int64_t nBlockHeight, CTxBudgetPayment &payment) const
bool UpdateValid(int nHeight)
std::string GetName() const
SERIALIZE_METHODS(CFinalizedBudget, obj)
void SetProposalsStr(const std::string _strProposals)
std::vector< CTxBudgetPayment > vecBudgetPayments
void SetSynced(bool synced)
const uint256 & GetFeeTXHash() const
bool IsPaidAlready(const uint256 &nProposalHash, const uint256 &nBlockHash, int nBlockHeight) const
bool CheckAmount(const CAmount &nTotalBudget)
bool updateExpired(int nCurrentHeight)
bool AddOrUpdateVote(const CFinalizedBudgetVote &vote, std::string &strError)
TrxValidationStatus IsTransactionValid(const CTransaction &txNew, const uint256 &nBlockHash, int nBlockHeight) const
bool ParseBroadcast(CDataStream &broadcast)
void SyncVotes(CNode *pfrom, bool fPartial, int &nInvCount) const
bool CheckProposals(const std::map< uint256, CBudgetProposal > &mapWinningProposals) const
std::map< COutPoint, CFinalizedBudgetVote > mapVotes
bool operator>(const CFinalizedBudget &other) const
void SetStrInvalid(const std::string &_strInvalid)
bool IsWellFormed(const CAmount &nTotalBudget)
bool IsAutoChecked() const
std::vector< uint256 > GetVotesHashes() const
std::string strBudgetName
CDataStream GetBroadcast() const
CAmount GetTotalPayout() const
std::vector< uint256 > GetProposalsHashes() const
UniValue GetVotesObject() const
int GetBlockStart() const
A writer stream (for serialization) that computes a 256-bit hash.
Information about a peer.
Serialized script, used inside transaction inputs and outputs.
The basic transaction that is broadcasted on the network and contained in blocks.
bool operator>(const CTxBudgetPayment &other) const
CTxBudgetPayment(const uint256 &_nProposalHash, const CScript &_payee, const CAmount _nAmount)
SERIALIZE_METHODS(CTxBudgetPayment, obj)
@ Valid
Transaction verification failed.
@ DoublePayment
Transaction successfully verified.
@ VoteThreshold
Transaction successfully verified, but includes a double-budget-payment.
#define LIMITED_STRING(obj, n)
const uint256 UINT256_ZERO
constant uint256 instances