mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 08:47:57 +00:00
Dont ignore errors in pallet benchmarking (#12449)
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
This commit is contained in:
committed by
GitHub
parent
ce9ce49bc6
commit
54c3e7f55f
@@ -297,16 +297,15 @@ impl PalletCmd {
|
||||
for (s, selected_components) in all_components.iter().enumerate() {
|
||||
// First we run a verification
|
||||
if !self.no_verify {
|
||||
// Dont use these results since verification code will add overhead
|
||||
let state = &state_without_tracking;
|
||||
let _results = StateMachine::new(
|
||||
let result = StateMachine::new(
|
||||
state,
|
||||
&mut changes,
|
||||
&executor,
|
||||
"Benchmark_dispatch_benchmark",
|
||||
&(
|
||||
&pallet.clone(),
|
||||
&extrinsic.clone(),
|
||||
&pallet,
|
||||
&extrinsic,
|
||||
&selected_components.clone(),
|
||||
true, // run verification code
|
||||
1, // no need to do internal repeats
|
||||
@@ -321,6 +320,20 @@ impl PalletCmd {
|
||||
.map_err(|e| {
|
||||
format!("Error executing and verifying runtime benchmark: {}", e)
|
||||
})?;
|
||||
// Dont use these results since verification code will add overhead.
|
||||
let _batch =
|
||||
<std::result::Result<Vec<BenchmarkBatch>, String> as Decode>::decode(
|
||||
&mut &result[..],
|
||||
)
|
||||
.map_err(|e| format!("Failed to decode benchmark results: {:?}", e))?
|
||||
.map_err(|e| {
|
||||
format!(
|
||||
"Benchmark {}::{} failed: {}",
|
||||
String::from_utf8_lossy(&pallet),
|
||||
String::from_utf8_lossy(&extrinsic),
|
||||
e
|
||||
)
|
||||
})?;
|
||||
}
|
||||
// Do one loop of DB tracking.
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user