From 684dd1848ede8117f74c6b1f3a6007094df2a4ab Mon Sep 17 00:00:00 2001 From: kuba-4chain Date: Thu, 4 Jul 2024 10:40:06 +0200 Subject: [PATCH] fix(peer): continue the loop instead of returning from the function --- peer.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/peer.go b/peer.go index 802a12e..ef198fe 100644 --- a/peer.go +++ b/peer.go @@ -554,18 +554,17 @@ func (p *Peer) handleGetDataMsg(dataMsg *wire.MsgGetData, logger *slog.Logger) { for _, invVect := range dataMsg.InvList { switch invVect.Type { - case wire.InvTypeTx: logger.Debug("Request for TX", slog.String(hashKey, invVect.Hash.String())) txRequests = append(txRequests, invVect) case wire.InvTypeBlock: logger.Info("Request for block", slog.String(hashKey, invVect.Hash.String()), slog.String(typeKey, invVect.Type.String())) - return + continue default: logger.Warn("Unknown type", slog.String(hashKey, invVect.Hash.String()), slog.String(typeKey, invVect.Type.String())) - return + continue } }