MCPcopy Create free account
hub / github.com/base/base / build_empty_payload

Method build_empty_payload

crates/execution/payload/src/builder.rs:371–386  ·  view source on GitHub ↗

NOTE: this should only be used for testing purposes because this doesn't have access to L1 system txs, hence on_missing_payload we return [MissingPayloadBehaviour::AwaitInProgress].

(
        &self,
        config: PayloadConfig<Self::Attributes, N::BlockHeader>,
    )

Source from the content-addressed store, hash-verified

369 // NOTE: this should only be used for testing purposes because this doesn't have access to L1
370 // system txs, hence on_missing_payload we return [MissingPayloadBehaviour::AwaitInProgress].
371 fn build_empty_payload(
372 &self,
373 config: PayloadConfig<Self::Attributes, N::BlockHeader>,
374 ) -> Result<Self::BuiltPayload, PayloadBuilderError> {
375 let args = BuildArguments {
376 config,
377 cached_reads: Default::default(),
378 execution_cache: None,
379 state_root_handle: None,
380 cancel: Default::default(),
381 best_payload: None,
382 };
383 self.build_payload(args, |_, _| NoopPayloadTransactions::<Pool::Transaction>::default())?
384 .into_payload()
385 .ok_or_else(|| PayloadBuilderError::MissingPayload)
386 }
387}
388
389/// Interrupts a pool iterator's walk past held resting transactions once its job is cancelled or

Callers

nothing calls this directly

Calls 2

into_payloadMethod · 0.80
build_payloadMethod · 0.45

Tested by

no test coverage detected