Bitshares-Core  2.0.181105
BitShares blockchain implementation and command-line interface software
Public Member Functions | Public Attributes | List of all members
graphene::chain::vote_counter Struct Reference

#include <vote_count.hpp>

Public Member Functions

template<typename Component >
void add (Component who, uint64_t votes)
 
void finish (authority &out_auth)
 
bool is_empty () const
 

Public Attributes

uint64_t last_votes = std::numeric_limits<uint64_t>::max()
 
uint64_t total_votes = 0
 
int8_t bitshift = -1
 
authority auth
 

Detailed Description

Keep track of vote totals in internal authority object. See #533.

Definition at line 34 of file vote_count.hpp.

Member Function Documentation

◆ add()

template<typename Component >
void graphene::chain::vote_counter::add ( Component  who,
uint64_t  votes 
)
inline

Definition at line 37 of file vote_count.hpp.

◆ finish()

void graphene::chain::vote_counter::finish ( authority out_auth)
inline

Write into out_auth, but only if we have at least one member.

Definition at line 55 of file vote_count.hpp.

◆ is_empty()

bool graphene::chain::vote_counter::is_empty ( ) const
inline

Definition at line 66 of file vote_count.hpp.

Member Data Documentation

◆ auth

authority graphene::chain::vote_counter::auth

Definition at line 74 of file vote_count.hpp.

◆ bitshift

int8_t graphene::chain::vote_counter::bitshift = -1

Definition at line 73 of file vote_count.hpp.

◆ last_votes

uint64_t graphene::chain::vote_counter::last_votes = std::numeric_limits<uint64_t>::max()

Definition at line 71 of file vote_count.hpp.

◆ total_votes

uint64_t graphene::chain::vote_counter::total_votes = 0

Definition at line 72 of file vote_count.hpp.


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