From 15a54f5cf280e97e6f13742bf8df868c6997ef1e Mon Sep 17 00:00:00 2001 From: Dan Shields <35669742+NukeManDan@users.noreply.github.com> Date: Wed, 22 Sep 2021 22:35:24 -0600 Subject: [PATCH 1/4] Clarify wieght traits needed to impl in example --- frame/example/src/lib.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/frame/example/src/lib.rs b/frame/example/src/lib.rs index 23c4951c1a603..6f72e2db41a3e 100644 --- a/frame/example/src/lib.rs +++ b/frame/example/src/lib.rs @@ -487,11 +487,11 @@ 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 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). // // The weight for this extrinsic we rely on the auto-generated `WeightInfo` from the // benchmark toolchain. From a069cf538919a158456c4cbfce88e38fed78116d Mon Sep 17 00:00:00 2001 From: Dan Shields <35669742+NukeManDan@users.noreply.github.com> Date: Wed, 22 Sep 2021 23:46:50 -0600 Subject: [PATCH 2/4] Update frame/example/src/lib.rs --- frame/example/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frame/example/src/lib.rs b/frame/example/src/lib.rs index 6f72e2db41a3e..1931e3871a46c 100644 --- a/frame/example/src/lib.rs +++ b/frame/example/src/lib.rs @@ -488,8 +488,8 @@ pub mod pallet { // // The parenthesized value of the `#[pallet::weight(..)]` attribute can be any type that // implements a set of traits, namely [`WeighData`], [`ClassifyDispatch`], and - // [`PaysFee`]. The former conveys the weight (a numeric representation of pure execution - // time and difficulty) of the transaction and the latter demonstrates the + // [`PaysFee`]. 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). // From deb60e686deb1a5962451ccb33bb6c41cbb74a24 Mon Sep 17 00:00:00 2001 From: Squirrel Date: Mon, 11 Oct 2021 12:41:30 +0100 Subject: [PATCH 3/4] Update frame/example/src/lib.rs Co-authored-by: Guillaume Thiolliere --- frame/example/src/lib.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/frame/example/src/lib.rs b/frame/example/src/lib.rs index 1931e3871a46c..b383f98712809 100644 --- a/frame/example/src/lib.rs +++ b/frame/example/src/lib.rs @@ -488,10 +488,11 @@ pub mod pallet { // // The parenthesized value of the `#[pallet::weight(..)]` attribute can be any type that // implements a set of traits, namely [`WeighData`], [`ClassifyDispatch`], and - // [`PaysFee`]. 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). + // [`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. From 4ed7698e7854a9cd905053ffca83db06f82cb78b Mon Sep 17 00:00:00 2001 From: thiolliere Date: Mon, 18 Oct 2021 11:29:38 +0200 Subject: [PATCH 4/4] fmt --- frame/example/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frame/example/src/lib.rs b/frame/example/src/lib.rs index 9b4a78e6a5cdf..981274b1ba739 100644 --- a/frame/example/src/lib.rs +++ b/frame/example/src/lib.rs @@ -486,7 +486,7 @@ 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`], [`ClassifyDispatch`], and + // 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.