Merge pull request #386 from filecoin-project/fix/miner-post-mul
Work around ChainAt bug and increase PoSt confidence
This commit is contained in:
commit
75db4576f5
@ -24,7 +24,7 @@ import (
|
|||||||
|
|
||||||
var log = logging.Logger("storageminer")
|
var log = logging.Logger("storageminer")
|
||||||
|
|
||||||
const PoStConfidence = 1
|
const PoStConfidence = 3
|
||||||
|
|
||||||
type Miner struct {
|
type Miner struct {
|
||||||
api storageMinerApi
|
api storageMinerApi
|
||||||
|
@ -99,11 +99,12 @@ func (m *Miner) scheduleNextPost(ppe uint64) {
|
|||||||
func (m *Miner) computePost(ppe uint64) func(ts *types.TipSet, curH uint64) error {
|
func (m *Miner) computePost(ppe uint64) func(ts *types.TipSet, curH uint64) error {
|
||||||
called := 0
|
called := 0
|
||||||
return func(ts *types.TipSet, curH uint64) error {
|
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++
|
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()
|
ctx := context.TODO()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user