update gitignore
This commit is contained in:
parent
c981f296e1
commit
94f448d6fa
1
.gitignore
vendored
1
.gitignore
vendored
@ -131,3 +131,4 @@ qa/pull-tester/tests-config.sh
|
||||
dash-cli
|
||||
dashd
|
||||
dash-qt
|
||||
make
|
||||
|
16
src/governance-settings.h
Normal file
16
src/governance-settings.h
Normal file
@ -0,0 +1,16 @@
|
||||
// Copyright (c) 2014-2016 The Dash Core developers
|
||||
|
||||
/*
|
||||
|
||||
|
||||
*/
|
||||
|
||||
class CGovernanceSettings
|
||||
{
|
||||
template<typename T>
|
||||
// strName=trigger, strParamater=ban-block ... obj= tigger.ban-block(args)
|
||||
static &T GetSetting(std::string strName)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
@ -186,7 +186,6 @@ private:
|
||||
public:
|
||||
bool fValid;
|
||||
std::string strName; //org name, username, prop name, etc.
|
||||
std::string strURL;
|
||||
int nStartTime;
|
||||
int nEndTime;
|
||||
CAmount nAmount; // 12.1 - remove
|
||||
@ -200,8 +199,42 @@ public:
|
||||
// -- check governance wiki for correct usage
|
||||
std::map<int, CGovernanceObjectRegister> mapRegister;
|
||||
|
||||
|
||||
CGovernanceObject();
|
||||
CGovernanceObject(const CGovernanceObject& other);
|
||||
CGovernanceObject(std::string strNameIn, int64_t nStartTimeIn, int64_t nEndTimeIn, uint256 nFeeTXHashIn);
|
||||
|
||||
bool HasMinimumRequiredSupport();
|
||||
bool IsValid(const CBlockIndex* pindex, std::string& strError, bool fCheckCollateral=true);
|
||||
bool IsEstablished();
|
||||
bool NetworkWillPay();
|
||||
|
||||
std::string GetName() {return strName; }
|
||||
std::string GetURL() {return strURL; }
|
||||
int GetStartTime() {return nStartTime;}
|
||||
int GetEndTime() {return nEndTime;}
|
||||
int IsActive(int64_t nTime) {return nTime > nStartTime && nTime < nEndTime;}
|
||||
int GetAbsoluteYesCount();
|
||||
int GetYesCount();
|
||||
int GetNoCount();
|
||||
int GetAbstainCount();
|
||||
|
||||
void CleanAndRemove(bool fSignatureCheck);
|
||||
void Relay();
|
||||
|
||||
uint256 GetHash(){
|
||||
CHashWriter ss(SER_GETHASH, PROTOCOL_VERSION);
|
||||
ss << strName;
|
||||
ss << nStartTime;
|
||||
ss << nEndTime;
|
||||
//ss << mapRegister;
|
||||
uint256 h1 = ss.GetHash();
|
||||
|
||||
return h1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Example usage:
|
||||
* AddRegister - Example usage:
|
||||
* --------------------------------------------------------
|
||||
*
|
||||
* We don't really care what's in these, as long as the masternode network
|
||||
@ -238,47 +271,12 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
CGovernanceObject();
|
||||
CGovernanceObject(const CGovernanceObject& other);
|
||||
CGovernanceObject(std::string strNameIn, std::string strURLIn, int64_t nStartTimeIn, int64_t nEndTimeIn, uint256 nFeeTXHashIn);
|
||||
|
||||
bool HasMinimumRequiredSupport();
|
||||
bool IsValid(const CBlockIndex* pindex, std::string& strError, bool fCheckCollateral=true);
|
||||
bool IsEstablished();
|
||||
bool NetworkWillPay();
|
||||
|
||||
std::string GetName() {return strName; }
|
||||
std::string GetURL() {return strURL; }
|
||||
int GetStartTime() {return nStartTime;}
|
||||
int GetEndTime() {return nEndTime;}
|
||||
int IsActive(int64_t nTime) {return nTime > nStartTime && nTime < nEndTime;}
|
||||
int GetAbsoluteYesCount();
|
||||
int GetYesCount();
|
||||
int GetNoCount();
|
||||
int GetAbstainCount();
|
||||
|
||||
void CleanAndRemove(bool fSignatureCheck);
|
||||
|
||||
uint256 GetHash(){
|
||||
CHashWriter ss(SER_GETHASH, PROTOCOL_VERSION);
|
||||
ss << strName;
|
||||
ss << strURL;
|
||||
ss << nStartTime;
|
||||
ss << nEndTime;
|
||||
//ss << mapRegister;
|
||||
uint256 h1 = ss.GetHash();
|
||||
|
||||
return h1;
|
||||
}
|
||||
void Relay();
|
||||
|
||||
ADD_SERIALIZE_METHODS;
|
||||
|
||||
template <typename Stream, typename Operation>
|
||||
inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
|
||||
//for syncing with other clients
|
||||
inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion)
|
||||
{
|
||||
READWRITE(LIMITED_STRING(strName, 20));
|
||||
READWRITE(LIMITED_STRING(strURL, 64));
|
||||
READWRITE(nTime);
|
||||
READWRITE(nStartTime);
|
||||
READWRITE(nEndTime);
|
||||
|
@ -22,9 +22,25 @@
|
||||
|
||||
using namespace std;
|
||||
|
||||
/*
|
||||
12.1 - needs to be rewritten
|
||||
- none of this is in the correct context now
|
||||
/**
|
||||
* NOTE: 12.1 - code needs to be rewritten, much of it's in the incorrect context
|
||||
*
|
||||
* Governance Object Creation and Voting
|
||||
* -------------------------------------------------------
|
||||
*
|
||||
* This code allows users to create new types of objects. To correctly use the system
|
||||
* please see the governance wiki and code-as-law implementation. Any conflicting entries will be
|
||||
* automatically downvoted and deleted, requiring resubmission to correct.
|
||||
*
|
||||
* command structure:
|
||||
*
|
||||
* governance prepare new nTypeIn nParentID "name" epoch-start epoch-end parameter1 parameter2 parameter3
|
||||
* >> fee transaction hash
|
||||
*
|
||||
* governance submit fee-hash nTypeIn nParentID, "name", epoch-start, epoch-end, fee-hash, parameter1, parameter2, parameter3
|
||||
* >> governance object hash
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
UniValue mnbudget(const UniValue& params, bool fHelp)
|
||||
|
Loading…
Reference in New Issue
Block a user