public void castBlockVote(bool accepted) { EventHandler handler = blockVoteSubmitted; BlockVoteEventArgs bArgs = new BlockVoteEventArgs(accepted); handler?.Invoke(this, bArgs); }
public void receiveBlockVote(object sender, BlockVoteEventArgs bArgs) { if (bArgs.accepted) { this.consensus.votesAccepted++; } else { this.consensus.votesRejected++; } }