mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-10 20:01:20 +00:00
set logger for peer's MConnection
This commit is contained in:
@ -390,7 +390,6 @@ func (conR *ConsensusReactor) broadcastProposalHeartbeatMessage(heartbeat types.
|
||||
}
|
||||
|
||||
func (conR *ConsensusReactor) broadcastNewRoundStep(rs *cstypes.RoundState) {
|
||||
|
||||
nrsMsg, csMsg := makeRoundStepMessages(rs)
|
||||
if nrsMsg != nil {
|
||||
conR.Switch.Broadcast(StateChannel, struct{ ConsensusMessage }{nrsMsg})
|
||||
|
@ -11,6 +11,7 @@ import (
|
||||
crypto "github.com/tendermint/go-crypto"
|
||||
wire "github.com/tendermint/go-wire"
|
||||
cmn "github.com/tendermint/tmlibs/common"
|
||||
"github.com/tendermint/tmlibs/log"
|
||||
)
|
||||
|
||||
// Peer is an interface representing a peer connected on a reactor.
|
||||
@ -136,6 +137,11 @@ func newPeerFromConnAndConfig(rawConn net.Conn, outbound bool, reactorsByCh map[
|
||||
return p, nil
|
||||
}
|
||||
|
||||
func (p *peer) SetLogger(l log.Logger) {
|
||||
p.Logger = l
|
||||
p.mconn.SetLogger(l)
|
||||
}
|
||||
|
||||
// CloseConn should be used when the peer was created, but never started.
|
||||
func (p *peer) CloseConn() {
|
||||
p.conn.Close()
|
||||
|
Reference in New Issue
Block a user