3139ffa25e
- snowbridge-pezpallet-* → pezsnowbridge-pezpallet-* (201 refs) - pallet/ directories → pezpallet/ (4 locations) - Fixed pezpallet.rs self-include recursion bug - Fixed sc-chain-spec hardcoded crate name in derive macro - Reverted .pezpallet_by_name() to .pallet_by_name() (subxt API) - Added BizinikiwiConfig type alias for zombienet tests - Deleted obsolete session state files Verified: pezsnowbridge-pezpallet-*, pezpallet-staking, pezpallet-staking-async, pezframe-benchmarking-cli all pass cargo check
37 lines
1.7 KiB
Rust
37 lines
1.7 KiB
Rust
// Copyright (C) Parity Technologies (UK) Ltd.
|
|
// This file is part of Parity Bridges Common.
|
|
|
|
// Parity Bridges Common is free software: you can redistribute it and/or modify
|
|
// it under the terms of the GNU General Public License as published by
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
// (at your option) any later version.
|
|
|
|
// Parity Bridges Common is distributed in the hope that it will be useful,
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
// GNU General Public License for more details.
|
|
|
|
// You should have received a copy of the GNU General Public License
|
|
// along with Parity Bridges Common. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
//! Primitives that may be used by different message delivery and dispatch mechanisms.
|
|
|
|
use codec::{Decode, DecodeWithMemTracking, Encode};
|
|
use pezframe_support::weights::Weight;
|
|
use scale_info::TypeInfo;
|
|
use pezsp_runtime::RuntimeDebug;
|
|
|
|
/// Message dispatch result.
|
|
#[derive(Encode, Decode, DecodeWithMemTracking, RuntimeDebug, Clone, PartialEq, Eq, TypeInfo)]
|
|
pub struct MessageDispatchResult<DispatchLevelResult> {
|
|
/// Unspent dispatch weight. This weight that will be deducted from total delivery transaction
|
|
/// weight, thus reducing the transaction cost. This shall not be zero in (at least) two cases:
|
|
///
|
|
/// 1) if message has been dispatched successfully, but post-dispatch weight is less than the
|
|
/// weight, declared by the message sender;
|
|
/// 2) if message has not been dispatched at all.
|
|
pub unspent_weight: Weight,
|
|
/// Fine-grained result of single message dispatch (for better diagnostic purposes)
|
|
pub dispatch_level_result: DispatchLevelResult,
|
|
}
|