Publish the dispatch info in extrinsic events (#4148)

* Publish the dispatch info in extrinsic events

Place the DispatchInfo (which contains weight information about the
extrinsic that is otherwise difficult to determine) in the dispatch
result value.

* Runtime bump.

* Fix build

* Fix tests

* Fix build?
This commit is contained in:
Gavin Wood
2019-11-22 15:11:04 +01:00
committed by GitHub
parent 04bd926923
commit 082c58176e
5 changed files with 30 additions and 22 deletions
+1 -2
View File
@@ -129,8 +129,7 @@ impl From<SimpleDispatchInfo> for DispatchClass {
}
/// A bundle of static information collected from the `#[weight = $x]` attributes.
#[cfg_attr(feature = "std", derive(PartialEq, Eq))]
#[derive(Clone, Copy, Default, RuntimeDebug)]
#[derive(Clone, Copy, Eq, PartialEq, Default, RuntimeDebug, Encode, Decode)]
pub struct DispatchInfo {
/// Weight of this transaction.
pub weight: Weight,