2019-10-02 20:29:40 +00:00
|
|
|
package build
|
|
|
|
|
2019-12-19 21:06:25 +00:00
|
|
|
import (
|
|
|
|
rice "github.com/GeertJohan/go.rice"
|
|
|
|
logging "github.com/ipfs/go-log"
|
|
|
|
)
|
|
|
|
|
2019-12-20 18:49:11 +00:00
|
|
|
// moved from now-defunct build/paramfetch.go
|
2019-12-19 21:06:25 +00:00
|
|
|
var log = logging.Logger("build")
|
2019-10-02 20:29:40 +00:00
|
|
|
|
|
|
|
func MaybeGenesis() []byte {
|
|
|
|
builtinGen, err := rice.FindBox("genesis")
|
|
|
|
if err != nil {
|
|
|
|
log.Warn("loading built-in genesis: %s", err)
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
genBytes, err := builtinGen.Bytes("devnet.car")
|
|
|
|
if err != nil {
|
|
|
|
log.Warn("loading built-in genesis: %s", err)
|
|
|
|
}
|
|
|
|
|
|
|
|
return genBytes
|
|
|
|
}
|