PIVX Core  5.6.99
P2P Digital Currency
Public Types | Public Member Functions | Public Attributes | List of all members
ProposalInfo Struct Reference

#include <governancemodel.h>

Collaboration diagram for ProposalInfo:
[legend]

Public Types

enum  Status {
  WAITING_FOR_APPROVAL , PASSING , PASSING_NOT_FUNDED , NOT_PASSING ,
  FINISHED
}
 

Public Member Functions

 ProposalInfo ()
 
 ProposalInfo (const uint256 &_id, std::string _name, std::string _url, int _votesYes, int _votesNo, std::string _recipientAdd, CAmount _amount, int _totalPayments, int _remainingPayments, Status _status, int _startBlock, int _endBlock)
 
bool operator== (const ProposalInfo &prop2) const
 
bool isFinished () const
 
std::string statusToStr () const
 

Public Attributes

uint256 id
 Proposal hash. More...
 
std::string name
 
std::string url
 
int votesYes {0}
 
int votesNo {0}
 
std::string recipientAdd
 Payment script destination. More...
 
CAmount amount {0}
 Amount of PIV paid per month. More...
 
int totalPayments {0}
 Amount of times that the proposal will be paid. More...
 
int remainingPayments {0}
 Amount of times that the proposal was paid already. More...
 
Status status {WAITING_FOR_APPROVAL}
 Proposal state. More...
 
int startBlock {0}
 Start superblock height. More...
 
int endBlock {0}
 End superblock height. More...
 

Detailed Description

Definition at line 19 of file governancemodel.h.

Member Enumeration Documentation

◆ Status

Enumerator
WAITING_FOR_APPROVAL 
PASSING 
PASSING_NOT_FUNDED 
NOT_PASSING 
FINISHED 

Definition at line 21 of file governancemodel.h.

Constructor & Destructor Documentation

◆ ProposalInfo() [1/2]

ProposalInfo::ProposalInfo ( )
inline

Definition at line 50 of file governancemodel.h.

◆ ProposalInfo() [2/2]

ProposalInfo::ProposalInfo ( const uint256 _id,
std::string  _name,
std::string  _url,
int  _votesYes,
int  _votesNo,
std::string  _recipientAdd,
CAmount  _amount,
int  _totalPayments,
int  _remainingPayments,
Status  _status,
int  _startBlock,
int  _endBlock 
)
inlineexplicit

Definition at line 51 of file governancemodel.h.

Member Function Documentation

◆ isFinished()

bool ProposalInfo::isFinished ( ) const
inline

Definition at line 61 of file governancemodel.h.

Here is the caller graph for this function:

◆ operator==()

bool ProposalInfo::operator== ( const ProposalInfo prop2) const
inline

Definition at line 60 of file governancemodel.h.

◆ statusToStr()

std::string ProposalInfo::statusToStr ( ) const

Definition at line 22 of file governancemodel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ amount

CAmount ProposalInfo::amount {0}

Amount of PIV paid per month.

Definition at line 38 of file governancemodel.h.

◆ endBlock

int ProposalInfo::endBlock {0}

End superblock height.

Definition at line 48 of file governancemodel.h.

◆ id

uint256 ProposalInfo::id

Proposal hash.

Definition at line 30 of file governancemodel.h.

◆ name

std::string ProposalInfo::name

Definition at line 31 of file governancemodel.h.

◆ recipientAdd

std::string ProposalInfo::recipientAdd

Payment script destination.

Definition at line 36 of file governancemodel.h.

◆ remainingPayments

int ProposalInfo::remainingPayments {0}

Amount of times that the proposal was paid already.

Definition at line 42 of file governancemodel.h.

◆ startBlock

int ProposalInfo::startBlock {0}

Start superblock height.

Definition at line 46 of file governancemodel.h.

◆ status

Status ProposalInfo::status {WAITING_FOR_APPROVAL}

Proposal state.

Definition at line 44 of file governancemodel.h.

◆ totalPayments

int ProposalInfo::totalPayments {0}

Amount of times that the proposal will be paid.

Definition at line 40 of file governancemodel.h.

◆ url

std::string ProposalInfo::url

Definition at line 32 of file governancemodel.h.

◆ votesNo

int ProposalInfo::votesNo {0}

Definition at line 34 of file governancemodel.h.

◆ votesYes

int ProposalInfo::votesYes {0}

Definition at line 33 of file governancemodel.h.


The documentation for this struct was generated from the following files: