EventView

EventView is used to store event has a

@recordType("event_view")
struct EventView {
enum eventsName;
uint id;
@label("$m")
@optional
@filter.Initialized
uint mother;
@label("$f")
@optional
@filter.Initialized
uint father;
@label("$n")
uint node_id;
@label("$a")
int altitude;
@label("$o")
int order;
@label("$r")
int round;
@label("$R")
int round_received;
@label("$w")
@optional
@filter.Initialized
bool witness;
@label("$i")
@optional
@filter.Initialized
bool intermediate;
@label("$intermediate")
@optional
Buffer intermediate_seen;
@label("$W")
@optional
Buffer witness_seen;
@label("$I")
@optional
Buffer intermediate_votes;
@label("$weak")
@optional
bool weak;
long nodes_amount;
@optional
@filter.Initialized
bool collector;
bool father_less;
}

Members

Variables

decided
bool decided;

Witness decided

strongly_seen
Buffer strongly_seen;

Witness seen strongly in previous round

voted
Buffer voted;

Witness which has voted yes

yes_votes
uint yes_votes;

Famous yes votes

Mixed In Members

From mixin HiBONRecord!(q{ this(const Event event, long nodes_amount, const uint relocate_node_id=uint.max) @safe pure nothrow { import std.algorithm : each; id=event.id; this.nodes_amount = nodes_amount; if (event.isGrounded) { mother = father = uint.max; } else { if (assumeWontThrow(event.mother)) { mother=assumeWontThrow(event.mother).id; } if (assumeWontThrow(event.father)) { father=assumeWontThrow(event.father).id; } } node_id=(relocate_node_id is size_t.max)?event.node_id:relocate_node_id; altitude=event.altitude; order=event.order; witness=event.isWitness; round=(event.hasRound)?event.round.number:event.round.number.min; father_less=event.isFatherLess; round_received=(event.round_received)?event.round_received.number:int.min; collector=event.collector; intermediate=event._intermediate_event; witness_seen=event.witness_seen_mask.bytes; intermediate_seen=event.intermediate_seen_mask.bytes; if (event.isWitness) { auto witness=event.witness; strongly_seen=witness.previous_strongly_seen_mask.bytes; yes_votes = witness.yes_votes; voted = witness.voted_yes_mask.bytes; intermediate_votes = witness.intermediate_voting_mask.bytes; //witness_seen = witness.previous_witness_seen_mask.bytes; decided = event.round.valid_witness[event.node_id]; weak = witness.weak; } } })

recordName
string recordName()

Get the record type name set by @recordType("name")