Add an error return to all actor state interface methods

This commit is contained in:
Aayush Rajasekaran
2020-09-23 01:51:38 -04:00
parent e27fc03f55
commit 476e7992e8
19 changed files with 245 additions and 111 deletions
+6 -1
View File
@@ -212,7 +212,12 @@ func (a *StateAPI) StateMinerProvingDeadline(ctx context.Context, addr address.A
return nil, xerrors.Errorf("failed to load miner actor state: %w", err)
}
return mas.DeadlineInfo(ts.Height()).NextNotElapsed(), nil
di, err := mas.DeadlineInfo(ts.Height())
if err != nil {
return nil, xerrors.Errorf("failed to get deadline info: %w", err)
}
return di.NextNotElapsed(), nil
}
func (a *StateAPI) StateMinerFaults(ctx context.Context, addr address.Address, tsk types.TipSetKey) (bitfield.BitField, error) {