fix: itests: Don't hang on exit in MineBlocksMustPost
This commit is contained in:
parent
18987f92ee
commit
42b2adddee
@ -192,7 +192,11 @@ func (bm *BlockMiner) MineBlocksMustPost(ctx context.Context, blocktime time.Dur
|
||||
InjectNulls: abi.ChainEpoch(nulls + i),
|
||||
Done: reportSuccessFn,
|
||||
})
|
||||
success = <-wait
|
||||
select {
|
||||
case success = <-wait:
|
||||
case <-ctx.Done():
|
||||
return
|
||||
}
|
||||
if !success {
|
||||
// if we are mining a new null block and it brings us past deadline boundary we need to wait for miner to post
|
||||
if ts.Height()+1+abi.ChainEpoch(nulls+i) >= dlinfo.Last() {
|
||||
|
Loading…
Reference in New Issue
Block a user