6 #ifndef PIVX_BUDGET_BUDGETPROPOSAL_H
7 #define PIVX_BUDGET_BUDGETPROPOSAL_H
13 static const CAmount PROPOSAL_FEE_TX = (50 * COIN);
14 static const CAmount BUDGET_FEE_TX_OLD = (50 * COIN);
15 static const CAmount BUDGET_FEE_TX = (5 * COIN);
16 static const int64_t BUDGET_VOTE_UPDATE_MIN = 60 * 60;
19 static const CAmount PROPOSAL_MIN_AMOUNT = 10 * COIN;
22 static const size_t PROP_URL_MAX_SIZE = 64;
23 static const size_t PROP_NAME_MAX_SIZE = 20;
81 bool IsPassing(
int nBlockStartBudget,
int nBlockEndBudget,
int mnCount)
const;
154 return netYes_a > netYes_b;
int64_t CAmount
Amount in PIV (Can be negative)
arith_uint256 UintToArith256(const uint256 &a)
void SetAllotted(CAmount nAllottedIn)
std::map< COutPoint, CBudgetVote > mapVotes
int GetRemainingPaymentCount(int nCurrentHeight) const
bool operator==(const CBudgetProposal &other) const
bool IsExpired(int nCurrentHeight) const
SERIALIZE_METHODS(CBudgetProposal, obj)
int GetBlockStart() const
CAmount GetAllotted() const
CDataStream GetBroadcast() const
bool updateExpired(int nCurrentHeight)
bool CheckAmount(const CAmount &nTotalBudget)
std::map< COutPoint, CBudgetVote > GetVotes() const
std::string GetURL() const
std::string IsInvalidReason() const
void SetFeeTxHash(const uint256 &txid)
static int GetBlockCycle(int nCurrentHeight)
std::string GetName() const
int GetBlockEndCycle() const
int GetVoteCount(CBudgetVote::VoteDirection vd) const
const uint256 & GetFeeTXHash() const
bool ParseBroadcast(CDataStream &broadcast)
bool operator>(const CBudgetProposal &other) const
void SetSynced(bool synced)
void SetStrInvalid(const std::string &_strInvalid)
bool AddOrUpdateVote(const CBudgetVote &vote, std::string &strError)
static bool PtrHigherYes(CBudgetProposal *a, CBudgetProposal *b)
std::string strProposalName
CAmount GetAmount() const
bool UpdateValid(int nHeight, int mnCount)
bool IsHeavilyDownvoted(int mnCount)
bool IsWellFormed(const CAmount &nTotalBudget)
void SyncVotes(CNode *pfrom, bool fPartial, int &nInvCount) const
std::string IsInvalidLogStr() const
int GetTotalPaymentCount() const
bool IsEstablished() const
UniValue GetVotesArray() const
bool IsPassing(int nBlockStartBudget, int nBlockEndBudget, int mnCount) const
int GetBlockStartCycle() const
A writer stream (for serialization) that computes a 256-bit hash.
Information about a peer.
Serialized script, used inside transaction inputs and outputs.
#define LIMITED_STRING(obj, n)