Reintroduce StateActorManifestCID

This commit is contained in:
Geoff Stuart
2022-08-22 17:17:01 -04:00
parent 5274ddce83
commit 7d07ddd837
13 changed files with 116 additions and 0 deletions
+14
View File
@@ -1537,6 +1537,20 @@ func (a *StateAPI) StateActorCodeCIDs(ctx context.Context, nv network.Version) (
return cids, nil
}
func (a *StateAPI) StateActorManifestCID(ctx context.Context, nv network.Version) (cid.Cid, error) {
actorVersion, err := actors.VersionForNetwork(nv)
if err != nil {
return cid.Undef, xerrors.Errorf("invalid network version")
}
c, ok := actors.GetManifest(actorVersion)
if !ok {
return cid.Undef, xerrors.Errorf("could not find manifest cid for network version %d, actors version %d", nv, actorVersion)
}
return c, nil
}
func (a *StateAPI) StateGetRandomnessFromTickets(ctx context.Context, personalization crypto.DomainSeparationTag, randEpoch abi.ChainEpoch, entropy []byte, tsk types.TipSetKey) (abi.Randomness, error) {
return a.StateManager.GetRandomnessFromTickets(ctx, personalization, randEpoch, entropy, tsk)
}