diff --git a/chainstate/broadcast_test.go b/chainstate/broadcast_test.go index 9d70933c..28c0a306 100644 --- a/chainstate/broadcast_test.go +++ b/chainstate/broadcast_test.go @@ -35,7 +35,8 @@ func TestClient_Broadcast(t *testing.T) { t.Run("error - missing tx id", func(t *testing.T) { // given - c := NewTestClient(context.Background(), t) + c := NewTestClient(context.Background(), t, + WithMinercraft(&MinerCraftBase{})) // when provider, err := c.Broadcast( @@ -50,7 +51,8 @@ func TestClient_Broadcast(t *testing.T) { t.Run("error - missing tx hex", func(t *testing.T) { // given - c := NewTestClient(context.Background(), t) + c := NewTestClient(context.Background(), t, + WithMinercraft(&MinerCraftBase{})) // when provider, err := c.Broadcast( @@ -105,6 +107,7 @@ func TestClient_Broadcast_BroadcastClient(t *testing.T) { Build() c := NewTestClient( context.Background(), t, + WithMinercraft(&MinerCraftBase{}), WithBroadcastClient(bc), ) diff --git a/chainstate/client_test.go b/chainstate/client_test.go index 4899a54d..fb65e16a 100644 --- a/chainstate/client_test.go +++ b/chainstate/client_test.go @@ -51,6 +51,7 @@ func TestNewClient(t *testing.T) { require.NotNil(t, customClient) c, err := NewClient( context.Background(), + WithMinercraft(&MinerCraftBase{}), WithBroadcastClient(customClient), ) require.NoError(t, err) @@ -61,7 +62,7 @@ func TestNewClient(t *testing.T) { t.Run("custom minercraft client", func(t *testing.T) { customClient, err := minercraft.NewClient( - minercraft.DefaultClientOptions(), nil, "", nil, nil, + minercraft.DefaultClientOptions(), &http.Client{}, minercraft.Arc, nil, nil, ) require.NoError(t, err) require.NotNil(t, customClient) diff --git a/chainstate/transaction_test.go b/chainstate/transaction_test.go index 6df900a1..84049040 100644 --- a/chainstate/transaction_test.go +++ b/chainstate/transaction_test.go @@ -97,7 +97,6 @@ func TestClient_Transaction_MAPI(t *testing.T) { assert.Equal(t, minerTaal.Name, info.Provider) assert.Equal(t, minerTaal.MinerID, info.MinerID) }) - } func TestClient_Transaction_BroadcastClient(t *testing.T) { @@ -110,6 +109,7 @@ func TestClient_Transaction_BroadcastClient(t *testing.T) { Build() c := NewTestClient( context.Background(), t, + WithMinercraft(&MinerCraftBase{}), WithBroadcastClient(bc), ) @@ -135,6 +135,7 @@ func TestClient_Transaction_BroadcastClient(t *testing.T) { Build() c := NewTestClient( context.Background(), t, + WithMinercraft(&MinerCraftBase{}), WithBroadcastClient(bc), WithNetwork(StressTestNet), ) @@ -161,6 +162,7 @@ func TestClient_Transaction_BroadcastClient(t *testing.T) { Build() c := NewTestClient( context.Background(), t, + WithMinercraft(&MinerCraftBase{}), WithBroadcastClient(bc), WithNetwork(TestNet), ) @@ -296,7 +298,8 @@ func TestClient_Transaction_MultipleClients_Fastest(t *testing.T) { t.Run("error - missing id", func(t *testing.T) { // given - c := NewTestClient(context.Background(), t) + c := NewTestClient(context.Background(), t, + WithMinercraft(&MinerCraftBase{})) // when info, err := c.QueryTransactionFastest( @@ -311,7 +314,8 @@ func TestClient_Transaction_MultipleClients_Fastest(t *testing.T) { t.Run("error - missing requirements", func(t *testing.T) { // given - c := NewTestClient(context.Background(), t) + c := NewTestClient(context.Background(), t, + WithMinercraft(&MinerCraftBase{})) // when info, err := c.QueryTransactionFastest(