pass error into waitFunc callback

This commit is contained in:
Yusef Napora
2020-07-03 17:15:43 -04:00
parent d6d68b9096
commit ea5dc461a1
9 changed files with 21 additions and 21 deletions
+2 -2
View File
@@ -116,7 +116,7 @@ func testStorageNode(ctx context.Context, t *testing.T, waddr address.Address, a
// start node
var minerapi api.StorageMiner
mineBlock := make(chan func(bool))
mineBlock := make(chan func(bool, error))
// TODO: use stop
_, err = node.New(ctx,
node.StorageMiner(&minerapi),
@@ -141,7 +141,7 @@ 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 {
mineOne := func(ctx context.Context, cb func(bool, error)) error {
select {
case mineBlock <- cb:
return nil