Skip to content

Commit 94f448d

Browse files
author
Evan Duffield
committed
update gitignore
1 parent c981f29 commit 94f448d

4 files changed

Lines changed: 73 additions & 42 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,3 +131,4 @@ qa/pull-tester/tests-config.sh
131131
dash-cli
132132
dashd
133133
dash-qt
134+
make

src/governance-settings.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// Copyright (c) 2014-2016 The Dash Core developers
2+
3+
/*
4+
5+
6+
*/
7+
8+
class CGovernanceSettings
9+
{
10+
template<typename T>
11+
// strName=trigger, strParamater=ban-block ... obj= tigger.ban-block(args)
12+
static &T GetSetting(std::string strName)
13+
{
14+
15+
}
16+
}

src/governance.h

Lines changed: 37 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,6 @@ class CGovernanceObject
186186
public:
187187
bool fValid;
188188
std::string strName; //org name, username, prop name, etc.
189-
std::string strURL;
190189
int nStartTime;
191190
int nEndTime;
192191
CAmount nAmount; // 12.1 - remove
@@ -200,8 +199,42 @@ class CGovernanceObject
200199
// -- check governance wiki for correct usage
201200
std::map<int, CGovernanceObjectRegister> mapRegister;
202201

202+
203+
CGovernanceObject();
204+
CGovernanceObject(const CGovernanceObject& other);
205+
CGovernanceObject(std::string strNameIn, int64_t nStartTimeIn, int64_t nEndTimeIn, uint256 nFeeTXHashIn);
206+
207+
bool HasMinimumRequiredSupport();
208+
bool IsValid(const CBlockIndex* pindex, std::string& strError, bool fCheckCollateral=true);
209+
bool IsEstablished();
210+
bool NetworkWillPay();
211+
212+
std::string GetName() {return strName; }
213+
std::string GetURL() {return strURL; }
214+
int GetStartTime() {return nStartTime;}
215+
int GetEndTime() {return nEndTime;}
216+
int IsActive(int64_t nTime) {return nTime > nStartTime && nTime < nEndTime;}
217+
int GetAbsoluteYesCount();
218+
int GetYesCount();
219+
int GetNoCount();
220+
int GetAbstainCount();
221+
222+
void CleanAndRemove(bool fSignatureCheck);
223+
void Relay();
224+
225+
uint256 GetHash(){
226+
CHashWriter ss(SER_GETHASH, PROTOCOL_VERSION);
227+
ss << strName;
228+
ss << nStartTime;
229+
ss << nEndTime;
230+
//ss << mapRegister;
231+
uint256 h1 = ss.GetHash();
232+
233+
return h1;
234+
}
235+
203236
/**
204-
* Example usage:
237+
* AddRegister - Example usage:
205238
* --------------------------------------------------------
206239
*
207240
* We don't really care what's in these, as long as the masternode network
@@ -238,47 +271,12 @@ class CGovernanceObject
238271
return true;
239272
}
240273

241-
CGovernanceObject();
242-
CGovernanceObject(const CGovernanceObject& other);
243-
CGovernanceObject(std::string strNameIn, std::string strURLIn, int64_t nStartTimeIn, int64_t nEndTimeIn, uint256 nFeeTXHashIn);
244-
245-
bool HasMinimumRequiredSupport();
246-
bool IsValid(const CBlockIndex* pindex, std::string& strError, bool fCheckCollateral=true);
247-
bool IsEstablished();
248-
bool NetworkWillPay();
249-
250-
std::string GetName() {return strName; }
251-
std::string GetURL() {return strURL; }
252-
int GetStartTime() {return nStartTime;}
253-
int GetEndTime() {return nEndTime;}
254-
int IsActive(int64_t nTime) {return nTime > nStartTime && nTime < nEndTime;}
255-
int GetAbsoluteYesCount();
256-
int GetYesCount();
257-
int GetNoCount();
258-
int GetAbstainCount();
259-
260-
void CleanAndRemove(bool fSignatureCheck);
261-
262-
uint256 GetHash(){
263-
CHashWriter ss(SER_GETHASH, PROTOCOL_VERSION);
264-
ss << strName;
265-
ss << strURL;
266-
ss << nStartTime;
267-
ss << nEndTime;
268-
//ss << mapRegister;
269-
uint256 h1 = ss.GetHash();
270-
271-
return h1;
272-
}
273-
void Relay();
274-
275274
ADD_SERIALIZE_METHODS;
276275

277276
template <typename Stream, typename Operation>
278-
inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
279-
//for syncing with other clients
277+
inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion)
278+
{
280279
READWRITE(LIMITED_STRING(strName, 20));
281-
READWRITE(LIMITED_STRING(strURL, 64));
282280
READWRITE(nTime);
283281
READWRITE(nStartTime);
284282
READWRITE(nEndTime);

src/rpcmasternode-budget.cpp

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,25 @@
2222

2323
using namespace std;
2424

25-
/*
26-
12.1 - needs to be rewritten
27-
- none of this is in the correct context now
25+
/**
26+
* NOTE: 12.1 - code needs to be rewritten, much of it's in the incorrect context
27+
*
28+
* Governance Object Creation and Voting
29+
* -------------------------------------------------------
30+
*
31+
* This code allows users to create new types of objects. To correctly use the system
32+
* please see the governance wiki and code-as-law implementation. Any conflicting entries will be
33+
* automatically downvoted and deleted, requiring resubmission to correct.
34+
*
35+
* command structure:
36+
*
37+
* governance prepare new nTypeIn nParentID "name" epoch-start epoch-end parameter1 parameter2 parameter3
38+
* >> fee transaction hash
39+
*
40+
* governance submit fee-hash nTypeIn nParentID, "name", epoch-start, epoch-end, fee-hash, parameter1, parameter2, parameter3
41+
* >> governance object hash
42+
*
43+
*
2844
*/
2945

3046
UniValue mnbudget(const UniValue& params, bool fHelp)

0 commit comments

Comments
 (0)