lnwire: use %v instead of %x when printing length of oversized msg

This commit is contained in:
Olaoluwa Osuntokun 2017-07-28 16:32:12 -07:00
parent 53f45e8210
commit f7800709ba
No known key found for this signature in database
GPG Key ID: 9CC5B105D03521A2
2 changed files with 4 additions and 1 deletions

@ -567,6 +567,9 @@ func (b *Machine) RecvActThree(actThree [ActThreeSize]byte) error {
"valid", actThree[0], HandshakeVersion)
}
// TODO(roasbeef): print out entire version each time, also print out
// which act the error occurred at
copy(s[:], actThree[1:33+16+1])
copy(p[:], actThree[33+16+1:])

@ -214,7 +214,7 @@ func WriteMessage(w io.Writer, msg Message, pver uint32) (int, error) {
if uint32(lenp) > mpl {
return totalBytes, fmt.Errorf("message payload is too large - "+
"encoded %d bytes, but maximum message payload of "+
"type %x is %d bytes", lenp, msg.MsgType(), mpl)
"type %v is %d bytes", lenp, msg.MsgType(), mpl)
}
// With the initial sanity checks complete, we'll now write out the