Skip to content

Commit

Permalink
Discard Executor (paritytech#1855)
Browse files Browse the repository at this point in the history
closes paritytech#622 

Pros:
* simpler interface, just functions:
`create_runtime_from_artifact_bytes()` and `execute_artifact()`

Cons:
* extra overhead of constructing executor semantics each time

I could make it a combination of
* `create_runtime_config(params)` (such that we could clone the
constructed semantics)
* `create_runtime(blob, config)`
* `execute_artifact(blob, config, params)`

Not sure if it's worth it though.

---------

Co-authored-by: Bastian Köcher <git@kchr.de>
  • Loading branch information
eagr and bkchr committed Oct 14, 2023
1 parent 31cc512 commit 9b85464
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ pub(crate) fn weight_witness_warning(
if dev_mode {
return
}

let CallWeightDef::Immediate(w) = &method.weight else { return };

let partial_warning = Warning::new_deprecated("UncheckedWeightWitness")
Expand Down Expand Up @@ -64,6 +65,7 @@ pub(crate) fn weight_constant_warning(
if dev_mode {
return
}

let syn::Expr::Lit(lit) = weight else { return };

let warning = Warning::new_deprecated("ConstantWeight")
Expand Down

0 comments on commit 9b85464

Please sign in to comment.