lotus/build/genesis.go

24 lines
475 B
Go
Raw Normal View History

2019-10-02 20:29:40 +00:00
package build
import (
rice "github.com/GeertJohan/go.rice"
logging "github.com/ipfs/go-log/v2"
)
// moved from now-defunct build/paramfetch.go
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.Warnf("loading built-in genesis: %s", err)
2019-10-02 20:29:40 +00:00
return nil
}
2021-01-05 05:32:15 +00:00
genBytes, err := builtinGen.Bytes(GenesisFile)
2019-10-02 20:29:40 +00:00
if err != nil {
log.Warnf("loading built-in genesis: %s", err)
2019-10-02 20:29:40 +00:00
}
return genBytes
}