mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-03 00:31:50 +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:
@@ -606,7 +606,12 @@ where
|
||||
};
|
||||
|
||||
let beacon_chain_builder = if let Some(trusted_setup) = config.trusted_setup {
|
||||
beacon_chain_builder.trusted_setup(trusted_setup)
|
||||
let kzg = trusted_setup
|
||||
.try_into()
|
||||
.map(Arc::new)
|
||||
.map(Some)
|
||||
.map_err(|e| format!("Failed to load trusted setup: {:?}", e))?;
|
||||
beacon_chain_builder.kzg(kzg)
|
||||
} else {
|
||||
beacon_chain_builder
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user