mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 03:31:05 +00:00
Expect less chaos: use explicit call indices (#1984)
* Expect less chaos: set call index explicitly. * mark test pallet as dev mode so explicit call indicies are not required. * Fix 'dev_mode' syntax Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
This commit is contained in:
@@ -335,6 +335,7 @@ pub mod pallet {
|
||||
///
|
||||
/// As a side effect, this function upgrades the current validation function
|
||||
/// if the appropriate time has come.
|
||||
#[pallet::call_index(0)]
|
||||
#[pallet::weight((0, DispatchClass::Mandatory))]
|
||||
// TODO: This weight should be corrected.
|
||||
pub fn set_validation_data(
|
||||
@@ -431,6 +432,7 @@ pub mod pallet {
|
||||
Ok(PostDispatchInfo { actual_weight: Some(total_weight), pays_fee: Pays::No })
|
||||
}
|
||||
|
||||
#[pallet::call_index(1)]
|
||||
#[pallet::weight((1_000, DispatchClass::Operational))]
|
||||
pub fn sudo_send_upward_message(
|
||||
origin: OriginFor<T>,
|
||||
@@ -441,6 +443,7 @@ pub mod pallet {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[pallet::call_index(2)]
|
||||
#[pallet::weight((1_000_000, DispatchClass::Operational))]
|
||||
pub fn authorize_upgrade(origin: OriginFor<T>, code_hash: T::Hash) -> DispatchResult {
|
||||
ensure_root(origin)?;
|
||||
@@ -451,6 +454,7 @@ pub mod pallet {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[pallet::call_index(3)]
|
||||
#[pallet::weight(1_000_000)]
|
||||
pub fn enact_authorized_upgrade(
|
||||
_: OriginFor<T>,
|
||||
|
||||
Reference in New Issue
Block a user