Merge pull request #3185 from filecoin-project/fix/chainwatch/fix-nil-smoothing-estimate

fix(chainwatch): Handle RewardState.EpochSmoothingEstimate == nil
This commit is contained in:
Łukasz Magiera 2020-08-20 11:20:58 +02:00 committed by GitHub
commit 0acc461cb1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -280,6 +280,9 @@ func (p *Processor) storeRewardSmoothingEstimates(rewards []rewardActorInfo) err
}
for _, rewardState := range rewards {
if rewardState.epochSmoothingEstimate == nil {
continue
}
if _, err := stmt.Exec(
rewardState.common.stateroot.String(),
rewardState.epochSmoothingEstimate.PositionEstimate.String(),