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

Commit

Permalink
Clarify wieght traits needed to impl in example (#9842)
Browse files Browse the repository at this point in the history
* Clarify wieght traits needed to impl in example

* Update frame/example/src/lib.rs

* Update frame/example/src/lib.rs

Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>

* fmt

Co-authored-by: Squirrel <gilescope@gmail.com>
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>
  • Loading branch information
3 people committed Oct 18, 2021
1 parent abeea6d commit d1ec40b
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions frame/example/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -486,11 +486,12 @@ pub mod pallet {
// the chain in a moderate rate.
//
// The parenthesized value of the `#[pallet::weight(..)]` attribute can be any type that
// implements a set of traits, namely [`WeighData`] and [`ClassifyDispatch`].
// The former conveys the weight (a numeric representation of pure execution time and
// difficulty) of the transaction and the latter demonstrates the [`DispatchClass`] of the
// call. A higher weight means a larger transaction (less of which can be placed in a
// single block).
// implements a set of traits, namely [`WeighData`], [`ClassifyDispatch`], and
// [`PaysFee`]. The first conveys the weight (a numeric representation of pure
// execution time and difficulty) of the transaction and the second demonstrates the
// [`DispatchClass`] of the call, the third gives whereas extrinsic must pay fees or not.
// A higher weight means a larger transaction (less of which can be placed in a single
// block).
//
// The weight for this extrinsic we rely on the auto-generated `WeightInfo` from the
// benchmark toolchain.
Expand Down

0 comments on commit d1ec40b

Please sign in to comment.