-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
42 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,23 @@ | ||
package build | ||
|
||
import ( | ||
rice "github.com/GeertJohan/go.rice" | ||
"embed" | ||
"path" | ||
|
||
logging "github.com/ipfs/go-log/v2" | ||
) | ||
|
||
// moved from now-defunct build/paramfetch.go | ||
var log = logging.Logger("build") | ||
|
||
//go:embed genesis | ||
var genesisfs embed.FS | ||
|
||
func MaybeGenesis() []byte { | ||
builtinGen, err := rice.FindBox("genesis") | ||
genBytes, err := genesisfs.ReadFile(path.Join("genesis", GenesisFile)) | ||
if err != nil { | ||
log.Warnf("loading built-in genesis: %s", err) | ||
return nil | ||
} | ||
genBytes, err := builtinGen.Bytes(GenesisFile) | ||
if err != nil { | ||
log.Warnf("loading built-in genesis: %s", err) | ||
} | ||
|
||
return genBytes | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,12 @@ | ||
package build | ||
|
||
import rice "github.com/GeertJohan/go.rice" | ||
import ( | ||
_ "embed" | ||
) | ||
|
||
//go:embed proof-params/parameters.json | ||
var params []byte | ||
|
||
func ParametersJSON() []byte { | ||
return rice.MustFindBox("proof-params").MustBytes("parameters.json") | ||
return params | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters