Add a boolean HasMinPower to return of GetPower

This commit is contained in:
Aayush Rajasekaran
2020-09-16 01:47:24 -04:00
parent b4ee519282
commit 90853e24cf
5 changed files with 23 additions and 22 deletions
+2 -1
View File
@@ -253,7 +253,7 @@ func (a *StateAPI) StateMinerPower(ctx context.Context, addr address.Address, ts
return nil, xerrors.Errorf("loading tipset %s: %w", tsk, err)
}
m, net, err := stmgr.GetPower(ctx, a.StateManager, ts, addr)
m, net, hmp, err := stmgr.GetPower(ctx, a.StateManager, ts, addr)
if err != nil {
return nil, err
}
@@ -261,6 +261,7 @@ func (a *StateAPI) StateMinerPower(ctx context.Context, addr address.Address, ts
return &api.MinerPower{
MinerPower: m,
TotalPower: net,
HasMinPower: hmp,
}, nil
}