mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-06-01 18:50:09 +02:00
peer: when logging message summaries use the correct preposition
This commit is contained in:
parent
4cf4fd377f
commit
8de0a4cb24
9
peer.go
9
peer.go
@ -878,8 +878,13 @@ func (p *peer) logWireMessage(msg lnwire.Message, read bool) {
|
||||
summary = "(" + summary + ")"
|
||||
}
|
||||
|
||||
return fmt.Sprintf("%v %v%s from %s", summaryPrefix,
|
||||
msg.MsgType(), summary, p)
|
||||
preposition := "to"
|
||||
if read {
|
||||
preposition = "from"
|
||||
}
|
||||
|
||||
return fmt.Sprintf("%v %v%s %v %s", summaryPrefix,
|
||||
msg.MsgType(), summary, preposition, p)
|
||||
}))
|
||||
|
||||
switch m := msg.(type) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user