Fix StateMinerPower again
This commit is contained in:
parent
abb8f29dfa
commit
485c3e34e8
@ -52,12 +52,14 @@ func (a *StateAPI) StateMinerPower(ctx context.Context, maddr address.Address, t
|
||||
return api.MinerPower{}, err
|
||||
}
|
||||
|
||||
slashed, err := stmgr.GetMinerSlashed(ctx, a.StateManager, ts, maddr)
|
||||
if err != nil {
|
||||
return api.MinerPower{}, err
|
||||
}
|
||||
if slashed != 0 {
|
||||
mpow = types.NewInt(0)
|
||||
if maddr != address.Undef {
|
||||
slashed, err := stmgr.GetMinerSlashed(ctx, a.StateManager, ts, maddr)
|
||||
if err != nil {
|
||||
return api.MinerPower{}, err
|
||||
}
|
||||
if slashed != 0 {
|
||||
mpow = types.NewInt(0)
|
||||
}
|
||||
}
|
||||
|
||||
return api.MinerPower{
|
||||
|
Loading…
Reference in New Issue
Block a user