pass error into waitFunc callback
This commit is contained in:
+2
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user