mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-08 23:18:15 -05:00
* Implement static analysis to prevent panics * Add nopanic to nogo * Fix violations and add exclusions Fix violations and add exclusions for all * Changelog fragment * Use pass.Report instead of pass.Reportf * Remove strings.ToLower for checking init method name * Add exclusion for herumi init * Move api/client/beacon template function to init and its own file * Fix nopanic testcase
18 lines
487 B
Go
18 lines
487 B
Go
package herumi
|
|
|
|
import "github.com/herumi/bls-eth-go-binary/bls"
|
|
|
|
// Init allows the required curve orders and appropriate sub-groups to be initialized.
|
|
// lint:nopanic -- This method is called at init time only.
|
|
func Init() {
|
|
if err := bls.Init(bls.BLS12_381); err != nil {
|
|
panic(err)
|
|
}
|
|
if err := bls.SetETHmode(bls.EthModeDraft07); err != nil {
|
|
panic(err)
|
|
}
|
|
// Check subgroup order for pubkeys and signatures.
|
|
bls.VerifyPublicKeyOrder(true)
|
|
bls.VerifySignatureOrder(true)
|
|
}
|