mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 12:51:02 +00:00
Remove BoundedVec half-impls in xcm (#6636)
* Replace sp-core dependency with more primitive crates * Remove BoundedVec half-impls in xcm * Fixes * Bump bounded-collections * Address review comments * Bump bounded-collections * Fix benchmarks * Fixes * Fixes * cargo fmt * Fix tests * Update url * Bump url to 2.3.1 * Bump anyhow * Use bounded-collections in pallet-xcm * Update substrate
This commit is contained in:
@@ -21,7 +21,7 @@ use frame_benchmarking::{benchmarks, BenchmarkError};
|
||||
use frame_support::dispatch::GetDispatchInfo;
|
||||
use sp_std::vec;
|
||||
use xcm::{
|
||||
latest::{prelude::*, MaybeErrorCode, Weight},
|
||||
latest::{prelude::*, MaxDispatchErrorLen, MaybeErrorCode, Weight},
|
||||
DoubleEncoded,
|
||||
};
|
||||
use xcm_executor::{ExecutorError, FeesMode};
|
||||
@@ -360,9 +360,9 @@ benchmarks! {
|
||||
|
||||
expect_transact_status {
|
||||
let mut executor = new_executor::<T>(Default::default());
|
||||
// 1024 is an overestimate but should be good enough until we have `max_encoded_len`.
|
||||
// Eventually it should be replaced by `DispatchError::max_encoded_len()`.
|
||||
let worst_error = || MaybeErrorCode::Error(vec![0; 1024]);
|
||||
let worst_error = || -> MaybeErrorCode {
|
||||
vec![0; MaxDispatchErrorLen::get() as usize].into()
|
||||
};
|
||||
executor.set_transact_status(worst_error());
|
||||
|
||||
let instruction = Instruction::ExpectTransactStatus(worst_error());
|
||||
@@ -430,7 +430,7 @@ benchmarks! {
|
||||
|
||||
clear_transact_status {
|
||||
let mut executor = new_executor::<T>(Default::default());
|
||||
executor.set_transact_status(MaybeErrorCode::Error(b"MyError".to_vec()));
|
||||
executor.set_transact_status(b"MyError".to_vec().into());
|
||||
|
||||
let instruction = Instruction::ClearTransactStatus;
|
||||
let xcm = Xcm(vec![instruction]);
|
||||
|
||||
Reference in New Issue
Block a user