From 1b9fd90a44f5024797a5d2b5e5c93940602472f9 Mon Sep 17 00:00:00 2001 From: kuba-4chain Date: Mon, 8 Jul 2024 14:49:10 +0200 Subject: [PATCH] feat(peerHandler): process already found txs even when error is returned --- peer.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/peer.go b/peer.go index ef198fe..8a32d90 100644 --- a/peer.go +++ b/peer.go @@ -571,7 +571,8 @@ func (p *Peer) handleGetDataMsg(dataMsg *wire.MsgGetData, logger *slog.Logger) { rawTxs, err := p.peerHandler.HandleTransactionsGet(txRequests, p) if err != nil { logger.Warn("Unable to fetch txs from store", slog.Int("count", len(txRequests)), slog.String(errKey, err.Error())) - return + // there is no return here because peerHandler.HandleTransactionsGet() may return + // already found rawTxs together with an error, so we want to process them } for _, txBytes := range rawTxs {