network: provide NullPayload where necessary
This commit is contained in:
parent
0a5049658f
commit
2cb536a6a1
2 changed files with 2 additions and 2 deletions
|
@ -216,7 +216,7 @@ func (m *Message) tryCompressPayload() error {
|
|||
compressedPayload := buf.Bytes()
|
||||
if m.Flags&Compressed == 0 {
|
||||
switch m.Payload.(type) {
|
||||
case *payload.Headers, *payload.MerkleBlock, *payload.NullPayload,
|
||||
case *payload.Headers, *payload.MerkleBlock, payload.NullPayload,
|
||||
*payload.Inventory:
|
||||
break
|
||||
default:
|
||||
|
|
|
@ -474,7 +474,7 @@ func (s *Server) handleVersionCmd(p Peer, version *payload.Version) error {
|
|||
}
|
||||
}
|
||||
s.lock.RUnlock()
|
||||
return p.SendVersionAck(NewMessage(CMDVerack, nil))
|
||||
return p.SendVersionAck(NewMessage(CMDVerack, payload.NewNullPayload()))
|
||||
}
|
||||
|
||||
// handleBlockCmd processes the received block received from its peer.
|
||||
|
|
Loading…
Reference in a new issue