From a05e6d2d2f6a2ae3d1d6d278d4458df7c046e034 Mon Sep 17 00:00:00 2001 From: Anton Evangelatov Date: Thu, 3 Jan 2019 15:15:43 +0100 Subject: [PATCH] p2p/protocols: log protocol spec on error --- p2p/protocols/protocol.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/p2p/protocols/protocol.go b/p2p/protocols/protocol.go index b16720dd39..5b9384820d 100644 --- a/p2p/protocols/protocol.go +++ b/p2p/protocols/protocol.go @@ -298,7 +298,7 @@ func (p *Peer) Send(ctx context.Context, msg interface{}) error { code, found := p.spec.GetCode(msg) if !found { - return errorf(ErrInvalidMsgType, "%v", code) + return errorf(ErrInvalidMsgType, "%v %s", code, p.spec.Name) } return p2p.Send(p.rw, code, wmsg) }