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:
Jimmy Chen
2024-04-12 06:14:11 +10:00
committed by GitHub
parent 34dbb32610
commit 7e49f82726
9 changed files with 46 additions and 40 deletions

View File

@@ -109,7 +109,7 @@ impl<E: EthSpec> MockServer<E> {
pub fn new_with_config(
handle: &runtime::Handle,
config: MockExecutionConfig,
kzg: Option<Kzg>,
kzg: Option<Arc<Kzg>>,
) -> Self {
let MockExecutionConfig {
jwt_key,
@@ -193,7 +193,7 @@ impl<E: EthSpec> MockServer<E> {
shanghai_time: Option<u64>,
cancun_time: Option<u64>,
prague_time: Option<u64>,
kzg: Option<Kzg>,
kzg: Option<Arc<Kzg>>,
) -> Self {
Self::new_with_config(
handle,