Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Reduce provisioner work #6328

Merged
20 commits merged into from
Dec 2, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update benchmark
  • Loading branch information
alexgparity committed Nov 30, 2022
commit a1e9ddf439e5424854c246b27a508e039c07cc52
25 changes: 3 additions & 22 deletions node/client/src/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -368,28 +368,9 @@ pub fn benchmark_inherent_data(
parent_header: header,
};

struct BenchmarkProvider(polkadot_primitives::v2::InherentData);
#[async_trait::async_trait]
impl sp_inherents::InherentDataProvider for BenchmarkProvider {
async fn provide_inherent_data(
&self,
dst_inherent_data: &mut sp_inherents::InherentData,
) -> Result<(), sp_inherents::Error> {
dst_inherent_data.put_data(*b"BENCH_PR", &self.0)
}

async fn try_handle_error(
&self,
_identifier: &sp_inherents::InherentIdentifier,
_error: &[u8],
) -> Option<Result<(), sp_inherents::Error>> {
None
}
}

futures::executor::block_on(
BenchmarkProvider(para_data).provide_inherent_data(&mut inherent_data),
)?;
inherent_data
.put_data(polkadot_primitives::v2::PARACHAINS_INHERENT_IDENTIFIER, &para_data)
.expect("put data failed");
This conversation was marked as resolved.
Show resolved Hide resolved

Ok(inherent_data)
}
Expand Down