remove duplicate miner addrs collection
This commit is contained in:
parent
bcd3e79557
commit
9c6b6e61fe
@ -28,16 +28,10 @@ func dealStressTest(t *testkit.TestEnvironment) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
addrs, err := testkit.CollectMinerAddrs(t, ctx, t.IntParam("miners"))
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
t.RecordMessage("got %v miner addrs", len(addrs))
|
|
||||||
|
|
||||||
client := cl.FullApi
|
client := cl.FullApi
|
||||||
|
|
||||||
// select a random miner
|
// select a random miner
|
||||||
minerAddr := addrs[rand.Intn(len(addrs))]
|
minerAddr := cl.MinerAddrs[rand.Intn(len(cl.MinerAddrs))]
|
||||||
if err := client.NetConnect(ctx, minerAddr.PeerAddr); err != nil {
|
if err := client.NetConnect(ctx, minerAddr.PeerAddr); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user