mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-22 20:45:40 +00:00
bench pallet: only require Hash instead of Block (#3244)
Preparation for https://github.com/paritytech/polkadot-sdk/issues/2664 Changes: - Only require `Hash` instead of `Block` for the benchmarking - Refactor DB types to do the same ## Integration This breaking change can easily be integrated into your node via: ```patch - cmd.run::<Block, ()>(config) + cmd.run::<HashingFor<Block>, ()>(config) ``` Status: waiting for CI checks --------- Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: Bastian Köcher <git@kchr.de> Co-authored-by: cheme <emericchevalier.pro@gmail.com>
This commit is contained in:
committed by
GitHub
parent
a2e6256c0d
commit
c36c51cac3
@@ -42,6 +42,7 @@ sc-tracing = { path = "../../substrate/client/tracing", optional = true }
|
||||
sc-sysinfo = { path = "../../substrate/client/sysinfo" }
|
||||
sc-executor = { path = "../../substrate/client/executor" }
|
||||
sc-storage-monitor = { path = "../../substrate/client/storage-monitor" }
|
||||
sp-runtime = { path = "../../substrate/primitives/runtime" }
|
||||
|
||||
[build-dependencies]
|
||||
substrate-build-script-utils = { path = "../../substrate/utils/build-script-utils" }
|
||||
@@ -63,9 +64,14 @@ runtime-benchmarks = [
|
||||
"polkadot-node-metrics/runtime-benchmarks",
|
||||
"sc-service?/runtime-benchmarks",
|
||||
"service/runtime-benchmarks",
|
||||
"sp-runtime/runtime-benchmarks",
|
||||
]
|
||||
full-node = ["service/full-node"]
|
||||
try-runtime = ["service/try-runtime", "try-runtime-cli/try-runtime"]
|
||||
try-runtime = [
|
||||
"service/try-runtime",
|
||||
"sp-runtime/try-runtime",
|
||||
"try-runtime-cli/try-runtime",
|
||||
]
|
||||
fast-runtime = ["service/fast-runtime"]
|
||||
pyroscope = ["pyro", "pyroscope_pprofrs"]
|
||||
|
||||
|
||||
@@ -451,7 +451,7 @@ pub fn run() -> Result<()> {
|
||||
|
||||
if cfg!(feature = "runtime-benchmarks") {
|
||||
runner.sync_run(|config| {
|
||||
cmd.run::<service::Block, ()>(config)
|
||||
cmd.run::<sp_runtime::traits::HashingFor<service::Block>, ()>(config)
|
||||
.map_err(|e| Error::SubstrateCli(e))
|
||||
})
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user