message: fix Verack processsing

Recent 9f42108ef completely broke handshaking.
This commit is contained in:
Roman Khimov 2020-06-20 00:28:51 +03:00
parent 36a65e3847
commit 892812d539

View file

@ -107,7 +107,7 @@ func (m *Message) Decode(br *io.BinReader) error {
// for an empty compressed payload
if l == 0 {
switch m.Command {
case CMDFilterClear, CMDGetAddr, CMDMempool:
case CMDFilterClear, CMDGetAddr, CMDMempool, CMDVerack:
m.Payload = payload.NewNullPayload()
default:
return errors.New("unexpected empty payload")