Fix worker key resolving

This commit is contained in:
Łukasz Magiera
2020-04-16 22:38:42 +02:00
parent 6eaafcf79d
commit dc2a67f13f
6 changed files with 32 additions and 3 deletions
+9
View File
@@ -216,6 +216,15 @@ func (a *StateAPI) StateLookupID(ctx context.Context, addr address.Address, tsk
return state.LookupID(addr)
}
func (a *StateAPI) StateAccountKey(ctx context.Context, addr address.Address, tsk types.TipSetKey) (address.Address, error) {
ts, err := a.Chain.GetTipSetFromKey(tsk)
if err != nil {
return address.Undef, xerrors.Errorf("loading tipset %s: %w", tsk, err)
}
return a.StateManager.ResolveToKeyAddress(ctx, addr, ts)
}
func (a *StateAPI) StateReadState(ctx context.Context, act *types.Actor, tsk types.TipSetKey) (*api.ActorState, error) {
ts, err := a.Chain.GetTipSetFromKey(tsk)
if err != nil {