Skip to content

Commit

Permalink
add more trace loggings
Browse files Browse the repository at this point in the history
  • Loading branch information
xlc committed Mar 2, 2020
1 parent ea1eff3 commit 8585204
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/voter/voting_round.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ impl<H, N, E: Environment<H, N>> VotingRound<H, N, E> where

// early exit if the current round is not completable
if !self.votes.completable() {
self.log_participation(log::Level::Trace);
return Poll::Pending;
}

Expand Down Expand Up @@ -384,8 +385,12 @@ impl<H, N, E: Environment<H, N>> VotingRound<H, N, E> where
log::log!(target: "afg", log_level, "Round {}: prevotes: {}/{}/{} weight, {}/{} actual",
number, prevote_weight, threshold, total_weight, n_prevotes, n_voters);

log::trace!(target: "afg", "Prevote voters: {:?}", self.votes.prevotes().iter().map(|x|&x.0).collect::<Vec<_>>());

log::log!(target: "afg", log_level, "Round {}: precommits: {}/{}/{} weight, {}/{} actual",
number, precommit_weight, threshold, total_weight, n_precommits, n_voters);

log::trace!(target: "afg", "Precommit voters: {:?}", self.votes.precommits().iter().map(|x|&x.0).collect::<Vec<_>>());
}

fn process_incoming(&mut self, cx: &mut Context) -> Result<(), E::Error> {
Expand Down

0 comments on commit 8585204

Please sign in to comment.