forked from TrueCloudLab/neoneo-go
network: fix getdata
handling
It was broken by 0ba6b2a7
, the peer only responded with one message instead of
full requested set.
This commit is contained in:
parent
ead0b8ff94
commit
39800aecb3
1 changed files with 7 additions and 4 deletions
|
@ -435,13 +435,16 @@ func (s *Server) handleGetDataCmd(p Peer, inv *payload.Inventory) error {
|
||||||
}
|
}
|
||||||
if msg != nil {
|
if msg != nil {
|
||||||
pkt, err := msg.Bytes()
|
pkt, err := msg.Bytes()
|
||||||
|
if err == nil {
|
||||||
|
if inv.Type == payload.ConsensusType {
|
||||||
|
err = p.EnqueueHPPacket(pkt)
|
||||||
|
} else {
|
||||||
|
err = p.EnqueuePacket(pkt)
|
||||||
|
}
|
||||||
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if inv.Type == payload.ConsensusType {
|
|
||||||
return p.EnqueueHPPacket(pkt)
|
|
||||||
}
|
|
||||||
return p.EnqueuePacket(pkt)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
|
Loading…
Reference in a new issue