Validate encoding of extrinsics passed to runtime (#6442)

* Validate encoding of extrinsics passed to runtime

* Bump codec version explicitly
This commit is contained in:
Arkadiy Paronyan
2020-06-19 21:27:16 +02:00
committed by GitHub
parent 9ee2427289
commit 7b34438178
131 changed files with 141 additions and 134 deletions
@@ -191,7 +191,8 @@ fn generate_native_call_generators(decl: &ItemTrait) -> Result<TokenStream> {
input: &I, error_desc: &'static str,
) -> std::result::Result<R, String>
{
<R as #crate_::Decode>::decode(
<R as #crate_::DecodeLimit>::decode_with_depth_limit(
#crate_::MAX_EXTRINSIC_DEPTH,
&mut &#crate_::Encode::encode(input)[..],
).map_err(|e| format!("{} {}", error_desc, e.what()))
}