(cfg: Arc<HostConfig>, providers: Arc<HostProviders>)
| 85 | |
| 86 | impl PayloadWitnessPrefetcher { |
| 87 | pub(crate) fn new(cfg: Arc<HostConfig>, providers: Arc<HostProviders>) -> Self { |
| 88 | Self { |
| 89 | inner: Arc::new(PayloadWitnessPrefetchInner { |
| 90 | cfg, |
| 91 | providers, |
| 92 | state: Mutex::new(PayloadWitnessPrefetchState::default()), |
| 93 | semaphore: Semaphore::new(PAYLOAD_WITNESS_PREFETCH_MAX_IN_FLIGHT), |
| 94 | }), |
| 95 | } |
| 96 | } |
| 97 | |
| 98 | #[cfg(test)] |
| 99 | fn take_ready(&self, parent_block_hash: B256, payload_attributes_digest: B256) -> bool { |