4 #ifndef GOVERNANCE_CLASSES_H 5 #define GOVERNANCE_CLASSES_H 15 #include <boost/shared_ptr.hpp> 18 class CGovernanceTrigger;
31 std::vector<std::string>
SplitBy(std::string strCommand, std::string strDelimit);
113 catch(std::exception& e)
115 LogPrintf(
"CGovernancePayment Payment not valid: addrIn = %s, nAmountIn = %d, what = %s\n",
116 addrIn.
ToString(), nAmountIn, e.what());
120 LogPrintf(
"CGovernancePayment Payment not valid: addrIn = %s, nAmountIn = %d\n",
void SetStatus(int nStatusIn)
boost::variant< CNoDestination, CKeyID, CScriptID > CTxDestination
static std::string GetRequiredPaymentsString(int nBlockHeight)
CGovernanceObject * FindGovernanceObject(const uint256 &nHash)
CGovernanceObject * GetGovernanceObject()
std::vector< std::string > SplitBy(std::string strCommand, std::string strDelimit)
static bool IsSuperblockTriggered(int nBlockHeight)
bool IsValid(const CTransaction &txNew, int nBlockHeight, CAmount blockReward)
CAmount GetPaymentsTotalAmount()
std::vector< CSuperblock_sptr > GetActiveTriggers()
bool GetPayment(int nPaymentIndex, CGovernancePayment &paymentRet)
std::string ToString() const
static bool IsValid(const CTransaction &txNew, int nBlockHeight, CAmount blockReward)
#define AssertLockHeld(cs)
CGovernanceTriggerManager()
static bool GetBestSuperblock(CSuperblock_sptr &pSuperblockRet, int nBlockHeight)
std::map< uint256, CSuperblock_sptr > trigger_m_t
CGovernanceTriggerManager triggerman
CGovernancePayment(CBitcoinAddress addrIn, CAmount nAmountIn)
CScript GetScriptForDestination(const CTxDestination &dest)
static CAmount GetPaymentsLimit(int nBlockHeight)
static const int SEEN_OBJECT_EXECUTED
void ParsePaymentSchedule(std::string &strPaymentAddresses, std::string &strPaymentAmounts)
trigger_m_t::const_iterator trigger_m_cit
CTxDestination Get() const
bool AddNewTrigger(uint256 nHash)
static const int TRIGGER_UNKNOWN
static const int TRIGGER_SUPERBLOCK
CGovernanceManager governance
std::vector< CGovernancePayment > vecPayments
boost::shared_ptr< CSuperblock > CSuperblock_sptr
static bool IsValidBlockHeight(int nBlockHeight)
trigger_m_t::iterator trigger_m_it
static void CreateSuperblock(CMutableTransaction &txNewRet, int nBlockHeight, std::vector< CTxOut > &voutSuperblockRet)