@@ -186,7 +186,6 @@ class CGovernanceObject
186186public:
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);
0 commit comments