From 526cd739f671cbe0a39d928090bee6a5d9cffa45 Mon Sep 17 00:00:00 2001 From: Aayush Rajasekaran Date: Fri, 20 Nov 2020 00:31:04 -0500 Subject: [PATCH] Return total power when GetPowerRaw doesn't find miner claim --- chain/stmgr/utils.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/chain/stmgr/utils.go b/chain/stmgr/utils.go index fb0b91378f8..5979bf70508 100644 --- a/chain/stmgr/utils.go +++ b/chain/stmgr/utils.go @@ -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)