Round.Rounder

The rounder takes care of cleaning up old round and keeps track of if an round has been decided or can be decided

Members

Functions

cached_decided_count
uint cached_decided_count()

Number of decided round in cached in memory

checkDecideRound
void checkDecideRound()

Perform check if round_to_be_decided can be decided If the round can be decided the the last_decided_round is set to round_to_be_decided

checkRoundVotes
void checkRoundVotes(immutable(EventPackage*) epack)

This function checks if the EventPackage is a RoundVote And added the round to the round_votes

checkToCollectRound
void checkToCollectRound()

If the round_to_be_decided is decided the this function Performs a epoch collection

check_decided_round_limit
bool check_decided_round_limit()

Check the coin round limit

coin_round_distance
long coin_round_distance()

Calculates the number of rounds since the last decided round

collectReceivedRound
void collectReceivedRound(Round r)

Collected the votes in round r and reports it to the hashgraph by calling the hashgraph.epoch function

count_majority_rounds
uint count_majority_rounds(Round r)

Counts the number of round from this round @r which has majority witnesses

last_decided_round
const(Round) last_decided_round()
opSlice
Range!false opSlice()
Range!true opSlice()

Range from this round and down

roundVote
void roundVote()

If the round_to_be_decided has not been decided This function will send the RoundVote to the graph and mark round decided

round_to_be_collected
const(Round) round_to_be_collected()
setNode
void setNode(Event e)

Sets the round for an event and creates an new round if needed

start_round
void start_round(Round r)

Sets the round which is the start round

Structs

Range
struct Range(bool CONST = true)

Range of rounds