mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-23 18:55:48 +00:00
PVF: Move PVF workers into separate crate (#7101)
* Move PVF workers into separate crate * Fix indentation * Fix compilation errors * Fix more compilation errors * Rename `worker.rs` files, make host interface to worker more clear * Fix more compilation errors * Fix more compilation errors * Add link to issue * Address review comments * Update comment
This commit is contained in:
@@ -36,13 +36,13 @@ use crate::host::tests::TEST_PREPARATION_TIMEOUT;
|
||||
#[derive(Clone, Encode, Decode)]
|
||||
pub struct PvfPrepData {
|
||||
/// Wasm code (uncompressed)
|
||||
pub(crate) code: Arc<Vec<u8>>,
|
||||
code: Arc<Vec<u8>>,
|
||||
/// Wasm code hash
|
||||
pub(crate) code_hash: ValidationCodeHash,
|
||||
code_hash: ValidationCodeHash,
|
||||
/// Executor environment parameters for the session for which artifact is prepared
|
||||
pub(crate) executor_params: Arc<ExecutorParams>,
|
||||
executor_params: Arc<ExecutorParams>,
|
||||
/// Preparation timeout
|
||||
pub(crate) prep_timeout: Duration,
|
||||
prep_timeout: Duration,
|
||||
}
|
||||
|
||||
impl PvfPrepData {
|
||||
@@ -69,15 +69,20 @@ impl PvfPrepData {
|
||||
}
|
||||
|
||||
/// Returns PVF code
|
||||
pub(crate) fn code(&self) -> Arc<Vec<u8>> {
|
||||
pub fn code(&self) -> Arc<Vec<u8>> {
|
||||
self.code.clone()
|
||||
}
|
||||
|
||||
/// Returns executor params
|
||||
pub(crate) fn executor_params(&self) -> Arc<ExecutorParams> {
|
||||
pub fn executor_params(&self) -> Arc<ExecutorParams> {
|
||||
self.executor_params.clone()
|
||||
}
|
||||
|
||||
/// Returns preparation timeout.
|
||||
pub fn prep_timeout(&self) -> Duration {
|
||||
self.prep_timeout
|
||||
}
|
||||
|
||||
/// Creates a structure for tests
|
||||
#[cfg(test)]
|
||||
pub(crate) fn from_discriminator_and_timeout(num: u32, timeout: Duration) -> Self {
|
||||
|
||||
Reference in New Issue
Block a user