Merge pull request #4559 from filecoin-project/fix/beyond-genesis
Fix random test failures
This commit is contained in:
commit
8124fe98c7
@ -1396,6 +1396,11 @@ loop:
|
|||||||
}
|
}
|
||||||
|
|
||||||
base := blockSet[len(blockSet)-1]
|
base := blockSet[len(blockSet)-1]
|
||||||
|
if base.Equals(known) {
|
||||||
|
blockSet = blockSet[:len(blockSet)-1]
|
||||||
|
base = blockSet[len(blockSet)-1]
|
||||||
|
}
|
||||||
|
|
||||||
if base.IsChildOf(known) {
|
if base.IsChildOf(known) {
|
||||||
// common case: receiving blocks that are building on top of our best tipset
|
// common case: receiving blocks that are building on top of our best tipset
|
||||||
return blockSet, nil
|
return blockSet, nil
|
||||||
|
@ -280,7 +280,7 @@ minerLoop:
|
|||||||
m.minedBlockHeights.Add(blkKey, true)
|
m.minedBlockHeights.Add(blkKey, true)
|
||||||
|
|
||||||
if err := m.api.SyncSubmitBlock(ctx, b); err != nil {
|
if err := m.api.SyncSubmitBlock(ctx, b); err != nil {
|
||||||
log.Errorf("failed to submit newly mined block: %s", err)
|
log.Errorf("failed to submit newly mined block: %+v", err)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
base.NullRounds++
|
base.NullRounds++
|
||||||
|
Loading…
Reference in New Issue
Block a user