mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-07 16:55:46 +00:00
Only load Kzg in tests if necessary and only load it once (#5555)
* Only load KZG once if necessary in tests.
This commit is contained in:
@@ -142,3 +142,11 @@ impl Kzg {
|
||||
.map_err(Into::into)
|
||||
}
|
||||
}
|
||||
|
||||
impl TryFrom<TrustedSetup> for Kzg {
|
||||
type Error = Error;
|
||||
|
||||
fn try_from(trusted_setup: TrustedSetup) -> Result<Self, Self::Error> {
|
||||
Kzg::new_from_trusted_setup(trusted_setup)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user