Clarify wieght traits needed to impl in example (#9842)

* 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>
This commit is contained in:
authored and GitHub committed 2021-10-18 10:42:56 +00:00
1 parent 403b348d19
commit b8514409fd
1 file changed
+6 -5
+6 -5
View File
@@ -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.