Merge pull request #4938 from filecoin-project/asr/total-power

Return total power when GetPowerRaw doesn't find miner claim
This commit is contained in:
Łukasz Magiera 2021-04-29 07:45:43 +02:00 committed by GitHub
commit 4b04cac219
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -105,8 +105,7 @@ func GetPowerRaw(ctx context.Context, sm *StateManager, st cid.Cid, maddr addres
var found bool var found bool
mpow, found, err = pas.MinerPower(maddr) mpow, found, err = pas.MinerPower(maddr)
if err != nil || !found { if err != nil || !found {
// TODO: return an error when not found? return power.Claim{}, tpow, false, err
return power.Claim{}, power.Claim{}, false, err
} }
minpow, err = pas.MinerNominalPowerMeetsConsensusMinimum(maddr) minpow, err = pas.MinerNominalPowerMeetsConsensusMinimum(maddr)