Merge pull request #386 from filecoin-project/fix/miner-post-mul

Work around ChainAt bug and increase PoSt confidence
This commit is contained in:
Łukasz Magiera 2019-10-17 03:38:30 +02:00 committed by GitHub
commit 75db4576f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 5 deletions

View File

@ -24,7 +24,7 @@ import (
var log = logging.Logger("storageminer")
const PoStConfidence = 1
const PoStConfidence = 3
type Miner struct {
api storageMinerApi

View File

@ -99,11 +99,12 @@ func (m *Miner) scheduleNextPost(ppe uint64) {
func (m *Miner) computePost(ppe uint64) func(ts *types.TipSet, curH uint64) error {
called := 0
return func(ts *types.TipSet, curH uint64) error {
if called > 0 {
log.Errorw("BUG: computePost callback called again", "ppe", ppe,
"height", ts.Height(), "curH", curH, "called", called)
}
called++
if called > 1 {
log.Errorw("BUG: computePost callback called again", "ppe", ppe,
"height", ts.Height(), "curH", curH, "called", called-1)
return nil
}
ctx := context.TODO()