Return total power when GetPowerRaw doesn't find miner claim

This commit is contained in:
Aayush Rajasekaran 2020-11-20 00:31:04 -05:00
parent df66f48f64
commit 526cd739f6

View File

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