diff --git a/chain/actors/policy/policy.go b/chain/actors/policy/policy.go index f210b8d94a7..07f489b11b1 100644 --- a/chain/actors/policy/policy.go +++ b/chain/actors/policy/policy.go @@ -187,6 +187,7 @@ func GetWinningPoStSectorSetLookback(nwVer network.Version) abi.ChainEpoch { return 10 } + // NOTE: if this ever changes, adjust it in a (*Miner).mineOne() logline as well return ChainFinality } diff --git a/miner/miner.go b/miner/miner.go index 15adfb99396..a77e1c18bc5 100644 --- a/miner/miner.go +++ b/miner/miner.go @@ -432,24 +432,12 @@ func (m *Miner) mineOne(ctx context.Context, base *MiningBase) (*types.BlockMsg, // always write out a log from this point out var winner *types.ElectionProof - lookBack := make(chan int64) - - // figure this out in the background, instead of slowing down the main loop - go func() { - lb := int64(-1) - if netVer, err := m.api.StateNetworkVersion(ctx, base.TipSet.Key()); err == nil { - lb = int64(policy.GetWinningPoStSectorSetLookback(netVer)) - } - lookBack <- lb - }() - defer func() { - log.Infow( "completed mineOne", "forRound", int64(round), "baseEpoch", int64(base.TipSet.Height()), - "lookbackEpochs", <-lookBack, + "lookbackEpochs", int64(policy.ChainFinality), // hardcoded as it is unlikely to change again: https://github.com/filecoin-project/lotus/blob/v1.8.0/chain/actors/policy/policy.go#L180-L186 "networkPowerAtLookback", mbi.NetworkPower.String(), "minerPowerAtLookback", mbi.MinerPower.String(), "isEligible", mbi.EligibleForMining,