Make Dispatchable return the actual weight consumed (#5458)

* Make Dispatchable return the actual weight consumed

Add PostInfo associated type to Dispatchable and have frame implement
Dispatchable { type PostInfo = PostDispatchInfo } where PostDispatchInfo
contains the actual weight consumed.

* Fix whitespace issues in docs
This commit is contained in:
Alexander Theißen
2020-04-03 16:45:30 +02:00
committed by GitHub
parent 14505471ee
commit 8f819f4ba6
11 changed files with 202 additions and 23 deletions
+1 -1
View File
@@ -379,6 +379,6 @@ impl<Origin, Call, Extra, Info> Applyable for TestXt<Call, Extra> where
None
};
Ok(self.call.dispatch(maybe_who.into()).map_err(Into::into))
Ok(self.call.dispatch(maybe_who.into()).map(|_| ()).map_err(|e| e.error))
}
}