Wait until blocks show up full nodes 'head' before claiming block has been mined

This commit is contained in:
whyrusleeping
2020-08-26 17:51:16 -07:00
parent deb013cecb
commit 36ff37ba47
9 changed files with 58 additions and 29 deletions
+5 -4
View File
@@ -270,11 +270,12 @@ func Builder(t *testing.T, nFull int, storage []test.StorageMiner) ([]test.TestN
var wait sync.Mutex
wait.Lock()
test.MineUntilBlock(ctx, t, storers[0], func() {
test.MineUntilBlock(ctx, t, fulls[0], storers[0], func(epoch abi.ChainEpoch) {
wait.Unlock()
})
wait.Lock()
test.MineUntilBlock(ctx, t, storers[0], func() {
test.MineUntilBlock(ctx, t, fulls[0], storers[0], func(epoch abi.ChainEpoch) {
wait.Unlock()
})
wait.Lock()
@@ -419,11 +420,11 @@ func MockSbBuilder(t *testing.T, nFull int, storage []test.StorageMiner) ([]test
var wait sync.Mutex
wait.Lock()
test.MineUntilBlock(ctx, t, storers[0], func() {
test.MineUntilBlock(ctx, t, fulls[0], storers[0], func(abi.ChainEpoch) {
wait.Unlock()
})
wait.Lock()
test.MineUntilBlock(ctx, t, storers[0], func() {
test.MineUntilBlock(ctx, t, fulls[0], storers[0], func(abi.ChainEpoch) {
wait.Unlock()
})
wait.Lock()