From e0e7e00d3b898b5c908657205974bd367e4f5b73 Mon Sep 17 00:00:00 2001 From: healthykim Date: Tue, 9 Dec 2025 16:46:05 +0900 Subject: [PATCH] fix: remove loop limit --- cmd/devp2p/internal/ethtest/suite.go | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/cmd/devp2p/internal/ethtest/suite.go b/cmd/devp2p/internal/ethtest/suite.go index cc9cda9788..b658d89675 100644 --- a/cmd/devp2p/internal/ethtest/suite.go +++ b/cmd/devp2p/internal/ethtest/suite.go @@ -479,9 +479,6 @@ func (s *Suite) TestGetLargeReceipts(t *utesting.T) { receiptHashes = append(receiptHashes, block.Header().ReceiptHash) } - // Query recursively until we collect every receipt - var loopLimit = 6 - incomplete := false lastBlock := 0 receipts := make([]*eth.ReceiptList69, len(blocks)) @@ -489,7 +486,7 @@ func (s *Suite) TestGetLargeReceipts(t *utesting.T) { receipts[i] = ð.ReceiptList69{} } - for incomplete || loopLimit > 0 { + for incomplete || lastBlock != len(blocks)-1 { // Create get receipt request. req := ð.GetReceiptsPacket70{ RequestId: 66, @@ -514,14 +511,6 @@ func (s *Suite) TestGetLargeReceipts(t *utesting.T) { lastBlock += len(resp.List) - 1 incomplete = resp.LastBlockIncomplete - loopLimit -= 1 - } - if incomplete { - t.Fatal("loop terminated before the completion of request") - } - - if len(receipts) != len(receiptHashes) { - t.Fatalf("wrong total response length: want %d, got %d", len(receiptHashes), len(receipts)) } hasher := trie.NewStackTrie(nil)