mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-10 11:41:21 +00:00
22 lines
586 B
Go
22 lines
586 B
Go
|
package spectest
|
||
|
|
||
|
import (
|
||
|
"io/ioutil"
|
||
|
|
||
|
"github.com/bazelbuild/rules_go/go/tools/bazel"
|
||
|
)
|
||
|
|
||
|
const prefix = "/eth2_spec_tests/tests/bls/"
|
||
|
|
||
|
// Load BLS yaml from spec test bls directory. The file parameter should be in
|
||
|
// the format of the path starting at the bls directory.
|
||
|
// Example: aggregate_pubkeys/aggregate_pubkeys.yaml where the full path would
|
||
|
// be tests/bls/aggregate_pubkeys/aggregate_pubkeys.yaml.
|
||
|
func loadBlsYaml(file string) ([]byte, error) {
|
||
|
filepath, err := bazel.Runfile(prefix + file)
|
||
|
if err != nil {
|
||
|
return []byte{}, err
|
||
|
}
|
||
|
return ioutil.ReadFile(filepath)
|
||
|
}
|