From 7c21eef5ef8b50d482f7c42fa6b840aad4c6baa2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CGheisMohammadi=E2=80=9D?= <36589218+GheisMohammadi@users.noreply.github.com> Date: Tue, 3 Oct 2023 17:20:45 +0800 Subject: [PATCH] fix stream tests --- p2p/stream/protocols/sync/stream_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/p2p/stream/protocols/sync/stream_test.go b/p2p/stream/protocols/sync/stream_test.go index cd3a3f061..9511de2ce 100644 --- a/p2p/stream/protocols/sync/stream_test.go +++ b/p2p/stream/protocols/sync/stream_test.go @@ -51,14 +51,14 @@ var ( testGetReceiptsRequest = syncpb.MakeGetReceiptsRequest(testGetReceipts) testGetReceiptsRequestMsg = syncpb.MakeMessageFromRequest(testGetReceiptsRequest) - testGetNodes = []common.Hash{ + testGetNodeData = []common.Hash{ numberToHash(1), numberToHash(2), numberToHash(3), numberToHash(4), numberToHash(5), } - testGetNodeDataRequest = syncpb.MakeGetNodeDataRequest(testGetNodes) + testGetNodeDataRequest = syncpb.MakeGetNodeDataRequest(testGetNodeData) testGetNodeDataRequestMsg = syncpb.MakeMessageFromRequest(testGetNodeDataRequest) maxBytes = uint64(500) @@ -312,7 +312,7 @@ func TestSyncStream_HandleGetNodeData(t *testing.T) { time.Sleep(200 * time.Millisecond) receivedBytes, _ := remoteSt.ReadBytes() - if err := checkGetNodeDataResult(receivedBytes, testGetBlockByHashes); err != nil { + if err := checkGetNodeDataResult(receivedBytes, testGetNodeData); err != nil { t.Fatal(err) } }