Contracts: Update read_sandbox (#1390)

* Update runtime.rs

* Fix

* Revert "Update runtime.rs"

This reverts commit 808f026a835b1f2707f640799454a50fd3a8be7b.

* nit mono-repo fixes
This commit is contained in:
PG Herveou
2023-09-04 21:33:20 +02:00
committed by GitHub
parent 01cdae878d
commit 076529ea55
3 changed files with 5 additions and 3 deletions
@@ -608,7 +608,7 @@ impl<'a, E: Ext + 'a> Runtime<'a, E> {
let mut bound_checked = memory
.get(ptr..ptr + D::max_encoded_len() as usize)
.ok_or_else(|| Error::<E::T>::OutOfBounds)?;
let decoded = D::decode_all_with_depth_limit(MAX_DECODE_NESTING, &mut bound_checked)
let decoded = D::decode_with_depth_limit(MAX_DECODE_NESTING, &mut bound_checked)
.map_err(|_| DispatchError::from(Error::<E::T>::DecodingFailed))?;
Ok(decoded)
}