mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-20 20:55:41 +00:00
* Companion for #11981 * more renaming * fmt * fixes * add generic type * Companion for #11831 * fix * revert changes * Delete rename-outer-enum.diff * revert * Update run_benches_for_runtime.sh * rename type Call & type Event * passing tests * fmt * small fixes * commit * fix * fmt * commit * error fixes * fix * small fix in test * Update lib.rs * Update lib.rs * Update lib.rs * Update lib.rs * Update lib.rs * Update lib.rs * Update lib.rs * remove RuntimeCall from pallet_grandpa * last fix * commit * rename * merge fix * update lockfile for {"substrate"} * cargo +nightly fmt * fix Co-authored-by: parity-processbot <> Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
This commit is contained in:
@@ -93,7 +93,9 @@ fn upward_message_id(data: &[u8]) -> MessageId {
|
||||
sp_io::hashing::blake2_256(data)
|
||||
}
|
||||
|
||||
impl<XcmExecutor: xcm::latest::ExecuteXcm<C::Call>, C: Config> UmpSink for XcmSink<XcmExecutor, C> {
|
||||
impl<XcmExecutor: xcm::latest::ExecuteXcm<C::RuntimeCall>, C: Config> UmpSink
|
||||
for XcmSink<XcmExecutor, C>
|
||||
{
|
||||
fn process_upward_message(
|
||||
origin: ParaId,
|
||||
mut data: &[u8],
|
||||
@@ -106,13 +108,13 @@ impl<XcmExecutor: xcm::latest::ExecuteXcm<C::Call>, C: Config> UmpSink for XcmSi
|
||||
};
|
||||
|
||||
let id = upward_message_id(&data[..]);
|
||||
let maybe_msg_and_weight = VersionedXcm::<C::Call>::decode_all_with_depth_limit(
|
||||
let maybe_msg_and_weight = VersionedXcm::<C::RuntimeCall>::decode_all_with_depth_limit(
|
||||
xcm::MAX_XCM_DECODE_DEPTH,
|
||||
&mut data,
|
||||
)
|
||||
.map(|xcm| {
|
||||
(
|
||||
Xcm::<C::Call>::try_from(xcm),
|
||||
Xcm::<C::RuntimeCall>::try_from(xcm),
|
||||
// NOTE: We are overestimating slightly here.
|
||||
// The benchmark is timing this whole function with different message sizes and a NOOP extrinsic to
|
||||
// measure the size-dependent weight. But as we use the weight funtion **in** the benchmarked funtion we
|
||||
@@ -218,7 +220,7 @@ pub mod pallet {
|
||||
#[pallet::config]
|
||||
pub trait Config: frame_system::Config + configuration::Config {
|
||||
/// The aggregate event.
|
||||
type Event: From<Event> + IsType<<Self as frame_system::Config>::Event>;
|
||||
type RuntimeEvent: From<Event> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
|
||||
|
||||
/// A place where all received upward messages are funneled.
|
||||
type UmpSink: UmpSink;
|
||||
|
||||
Reference in New Issue
Block a user