From 7d493774c71d6ccefa9238e4309d5c57724c562f Mon Sep 17 00:00:00 2001 From: Ethan Buchman Date: Fri, 14 Oct 2016 20:27:50 -0400 Subject: [PATCH] log: move some Info to Debug --- blockchain/reactor.go | 2 +- consensus/reactor.go | 26 +++++++++++++------------- mempool/reactor.go | 2 +- rpc/core/blocks.go | 2 +- state/execution.go | 2 +- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/blockchain/reactor.go b/blockchain/reactor.go index 5946e77dc..ae52c7738 100644 --- a/blockchain/reactor.go +++ b/blockchain/reactor.go @@ -129,7 +129,7 @@ func (bcR *BlockchainReactor) Receive(chID byte, src *p2p.Peer, msgBytes []byte) return } - log.Info("Receive", "src", src, "chID", chID, "msg", msg) + log.Debug("Receive", "src", src, "chID", chID, "msg", msg) switch msg := msg.(type) { case *bcBlockRequestMessage: diff --git a/consensus/reactor.go b/consensus/reactor.go index be29f18e6..dce2b9d12 100644 --- a/consensus/reactor.go +++ b/consensus/reactor.go @@ -152,7 +152,7 @@ func (conR *ConsensusReactor) Receive(chID byte, src *p2p.Peer, msgBytes []byte) // TODO punish peer? return } - log.Info("Receive", "src", src, "chId", chID, "msg", msg) + log.Debug("Receive", "src", src, "chId", chID, "msg", msg) // Get peer states ps := src.Data.Get(types.PeerStateKey).(*PeerState) @@ -449,21 +449,21 @@ OUTER_LOOP: // If there are lastCommits to send... if prs.Step == RoundStepNewHeight { if ps.PickSendVote(rs.LastCommit) { - log.Info("Picked rs.LastCommit to send") + log.Debug("Picked rs.LastCommit to send") continue OUTER_LOOP } } // If there are prevotes to send... if prs.Step <= RoundStepPrevote && prs.Round != -1 && prs.Round <= rs.Round { if ps.PickSendVote(rs.Votes.Prevotes(prs.Round)) { - log.Info("Picked rs.Prevotes(prs.Round) to send") + log.Debug("Picked rs.Prevotes(prs.Round) to send") continue OUTER_LOOP } } // If there are precommits to send... if prs.Step <= RoundStepPrecommit && prs.Round != -1 && prs.Round <= rs.Round { if ps.PickSendVote(rs.Votes.Precommits(prs.Round)) { - log.Info("Picked rs.Precommits(prs.Round) to send") + log.Debug("Picked rs.Precommits(prs.Round) to send") continue OUTER_LOOP } } @@ -471,7 +471,7 @@ OUTER_LOOP: if prs.ProposalPOLRound != -1 { if polPrevotes := rs.Votes.Prevotes(prs.ProposalPOLRound); polPrevotes != nil { if ps.PickSendVote(polPrevotes) { - log.Info("Picked rs.Prevotes(prs.ProposalPOLRound) to send") + log.Debug("Picked rs.Prevotes(prs.ProposalPOLRound) to send") continue OUTER_LOOP } } @@ -482,7 +482,7 @@ OUTER_LOOP: // If peer is lagging by height 1, send LastCommit. if prs.Height != 0 && rs.Height == prs.Height+1 { if ps.PickSendVote(rs.LastCommit) { - log.Info("Picked rs.LastCommit to send") + log.Debug("Picked rs.LastCommit to send") continue OUTER_LOOP } } @@ -493,9 +493,9 @@ OUTER_LOOP: // Load the block commit for prs.Height, // which contains precommit signatures for prs.Height. commit := conR.blockStore.LoadBlockCommit(prs.Height) - log.Info("Loaded BlockCommit for catch-up", "height", prs.Height, "commit", commit) + log.Debug("Loaded BlockCommit for catch-up", "height", prs.Height, "commit", commit) if ps.PickSendVote(commit) { - log.Info("Picked Catchup commit to send") + log.Debug("Picked Catchup commit to send") continue OUTER_LOOP } } @@ -759,23 +759,23 @@ func (ps *PeerState) setHasVote(height int, round int, type_ byte, index int) { switch type_ { case types.VoteTypePrevote: ps.Prevotes.SetIndex(index, true) - log.Info("SetHasVote(round-match)", "prevotes", ps.Prevotes, "index", index) + log.Debug("SetHasVote(round-match)", "prevotes", ps.Prevotes, "index", index) case types.VoteTypePrecommit: ps.Precommits.SetIndex(index, true) - log.Info("SetHasVote(round-match)", "precommits", ps.Precommits, "index", index) + log.Debug("SetHasVote(round-match)", "precommits", ps.Precommits, "index", index) } } else if ps.CatchupCommitRound == round { switch type_ { case types.VoteTypePrevote: case types.VoteTypePrecommit: ps.CatchupCommit.SetIndex(index, true) - log.Info("SetHasVote(CatchupCommit)", "precommits", ps.Precommits, "index", index) + log.Debug("SetHasVote(CatchupCommit)", "precommits", ps.Precommits, "index", index) } } else if ps.ProposalPOLRound == round { switch type_ { case types.VoteTypePrevote: ps.ProposalPOL.SetIndex(index, true) - log.Info("SetHasVote(ProposalPOL)", "prevotes", ps.Prevotes, "index", index) + log.Debug("SetHasVote(ProposalPOL)", "prevotes", ps.Prevotes, "index", index) case types.VoteTypePrecommit: } } @@ -785,7 +785,7 @@ func (ps *PeerState) setHasVote(height int, round int, type_ byte, index int) { case types.VoteTypePrevote: case types.VoteTypePrecommit: ps.LastCommit.SetIndex(index, true) - log.Info("setHasVote(LastCommit)", "lastCommit", ps.LastCommit, "index", index) + log.Debug("setHasVote(LastCommit)", "lastCommit", ps.LastCommit, "index", index) } } } else { diff --git a/mempool/reactor.go b/mempool/reactor.go index 92db544dd..9e2888b1b 100644 --- a/mempool/reactor.go +++ b/mempool/reactor.go @@ -66,7 +66,7 @@ func (memR *MempoolReactor) Receive(chID byte, src *p2p.Peer, msgBytes []byte) { log.Warn("Error decoding message", "error", err) return } - log.Info("Receive", "src", src, "chId", chID, "msg", msg) + log.Debug("Receive", "src", src, "chId", chID, "msg", msg) switch msg := msg.(type) { case *TxMessage: diff --git a/rpc/core/blocks.go b/rpc/core/blocks.go index fd5e2ff6d..92ed7bc7e 100644 --- a/rpc/core/blocks.go +++ b/rpc/core/blocks.go @@ -18,7 +18,7 @@ func BlockchainInfo(minHeight, maxHeight int) (*ctypes.ResultBlockchainInfo, err if minHeight == 0 { minHeight = MaxInt(1, maxHeight-20) } - log.Info("BlockchainInfoHandler", "maxHeight", maxHeight, "minHeight", minHeight) + log.Debug("BlockchainInfoHandler", "maxHeight", maxHeight, "minHeight", minHeight) blockMetas := []*types.BlockMeta{} for height := maxHeight; height >= minHeight; height-- { diff --git a/state/execution.go b/state/execution.go index 804cecfcb..088c693e2 100644 --- a/state/execution.go +++ b/state/execution.go @@ -106,7 +106,7 @@ func (s *State) execBlockOnProxyApp(eventCache types.Fireable, proxyAppConn prox return err } // TODO: Do something with changedValidators - log.Info("TODO: Do something with changedValidators", changedValidators) + log.Info("TODO: Do something with changedValidators", "changedValidators", changedValidators) log.Info(Fmt("ExecBlock got %v valid txs and %v invalid txs", validTxs, invalidTxs)) return nil