2022-05-11 19:30:07 +00:00
|
|
|
package build
|
|
|
|
|
|
|
|
import (
|
2022-05-12 17:53:12 +00:00
|
|
|
"bytes"
|
|
|
|
|
2022-05-11 19:30:07 +00:00
|
|
|
"github.com/filecoin-project/lotus/chain/actors"
|
2022-05-12 17:53:12 +00:00
|
|
|
|
|
|
|
"github.com/BurntSushi/toml"
|
2022-05-11 19:30:07 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
var BuiltinActorReleases map[actors.Version]string
|
|
|
|
|
|
|
|
func init() {
|
2022-05-12 17:53:12 +00:00
|
|
|
BuiltinActorReleases = make(map[actors.Version]string)
|
|
|
|
|
|
|
|
spec := BundleSpec{}
|
|
|
|
|
|
|
|
r := bytes.NewReader(BuiltinActorBundles)
|
|
|
|
_, err := toml.DecodeReader(r, &spec)
|
|
|
|
if err != nil {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
|
|
|
|
for _, b := range spec.Bundles {
|
|
|
|
BuiltinActorReleases[b.Version] = b.Release
|
2022-05-11 19:30:07 +00:00
|
|
|
}
|
|
|
|
}
|