From 370ed78099e7d0509a51f6faa6ded384bb7cbbc4 Mon Sep 17 00:00:00 2001 From: Joshua Kim <20001595+joshua-kim@users.noreply.github.com> Date: Wed, 6 Dec 2023 15:07:45 -0500 Subject: [PATCH] nit Signed-off-by: Joshua Kim <20001595+joshua-kim@users.noreply.github.com> --- network/p2p/network_test.go | 8 ++++---- x/sync/mock_network_client.go | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/network/p2p/network_test.go b/network/p2p/network_test.go index 3909ab7e39ff..17b02a3fa0a2 100644 --- a/network/p2p/network_test.go +++ b/network/p2p/network_test.go @@ -90,7 +90,7 @@ func TestAppRequestResponse(t *testing.T) { sender.SendAppRequestF = func(ctx context.Context, nodeIDs set.Set[ids.NodeID], requestID uint32, request []byte) error { for range nodeIDs { go func() { - require.NoError(t, network.AppRequestFailed(ctx, nodeID, requestID)) + require.NoError(t, network.AppRequestFailed(ctx, nodeID, requestID, errFoo)) }() } @@ -145,7 +145,7 @@ func TestAppRequestResponse(t *testing.T) { requestFunc: func(t *testing.T, network *Network, client *Client, sender *common.SenderTest, handler *mocks.MockHandler, wg *sync.WaitGroup) { sender.SendCrossChainAppRequestF = func(ctx context.Context, chainID ids.ID, requestID uint32, request []byte) { go func() { - require.NoError(t, network.CrossChainAppRequestFailed(ctx, chainID, requestID)) + require.NoError(t, network.CrossChainAppRequestFailed(ctx, chainID, requestID, errFoo)) }() } @@ -278,7 +278,7 @@ func TestNetworkDropMessage(t *testing.T) { { name: "drop unrequested app request failed", requestFunc: func(network *Network) error { - return network.AppRequestFailed(context.Background(), ids.GenerateTestNodeID(), 0) + return network.AppRequestFailed(context.Background(), ids.GenerateTestNodeID(), 0, errFoo) }, err: ErrUnrequestedResponse, }, @@ -292,7 +292,7 @@ func TestNetworkDropMessage(t *testing.T) { { name: "drop unrequested cross-chain request failed", requestFunc: func(network *Network) error { - return network.CrossChainAppRequestFailed(context.Background(), ids.GenerateTestID(), 0) + return network.CrossChainAppRequestFailed(context.Background(), ids.GenerateTestID(), 0, errFoo) }, err: ErrUnrequestedResponse, }, diff --git a/x/sync/mock_network_client.go b/x/sync/mock_network_client.go index eeff3d6ee210..8021a015f062 100644 --- a/x/sync/mock_network_client.go +++ b/x/sync/mock_network_client.go @@ -37,9 +37,9 @@ func (m *MockNetworkClient) EXPECT() *MockNetworkClientMockRecorder { } // AppRequestFailed mocks base method. -func (m *MockNetworkClient) AppRequestFailed(arg0 context.Context, arg1 ids.NodeID, arg2 uint32, arg3 error) error { +func (m *MockNetworkClient) AppRequestFailed(arg0 context.Context, arg1 ids.NodeID, arg2 uint32) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AppRequestFailed", arg0, arg1, arg2, arg3) + ret := m.ctrl.Call(m, "AppRequestFailed", arg0, arg1, arg2) ret0, _ := ret[0].(error) return ret0 }