Merge pull request #1080 from nspcc-dev/fix-verack

message: fix Verack processsing
This commit is contained in:
Roman Khimov 2020-06-20 10:52:18 +03:00 committed by GitHub
commit da2d96d42f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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