Fix some tests

This commit is contained in:
Łukasz Magiera
2020-07-28 18:16:56 +02:00
parent 1fd23248ff
commit fb59b40507
12 changed files with 71 additions and 55 deletions
+3 -3
View File
@@ -117,7 +117,7 @@ func testStorageNode(ctx context.Context, t *testing.T, waddr address.Address, a
// start node
var minerapi api.StorageMiner
mineBlock := make(chan func(bool, error))
mineBlock := make(chan miner.MineReq)
// TODO: use stop
_, err = node.New(ctx,
node.StorageMiner(&minerapi),
@@ -142,9 +142,9 @@ func testStorageNode(ctx context.Context, t *testing.T, waddr address.Address, a
err = minerapi.NetConnect(ctx, remoteAddrs)
require.NoError(t, err)*/
mineOne := func(ctx context.Context, cb func(bool, error)) error {
mineOne := func(ctx context.Context, req miner.MineReq) error {
select {
case mineBlock <- cb:
case mineBlock <- req:
return nil
case <-ctx.Done():
return ctx.Err()