Skip to content

Commit

Permalink
hotfix fix weight assignments
Browse files Browse the repository at this point in the history
  • Loading branch information
brenzi committed Jul 14, 2023
1 parent a13f359 commit 8de46ff
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions enclave-bridge/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ pub mod pallet {
/// The bonding_account does not have a private key as the balance on this account is exclusively managed from withing the pallet_teerex.
/// Note: The bonding_account is bit-equivalent to the worker shard.
#[pallet::call_index(2)]
#[pallet::weight((1000, DispatchClass::Normal, Pays::No))]
#[pallet::weight((<T as Config>::WeightInfo::shield_funds(), DispatchClass::Normal, Pays::Yes))]
pub fn shield_funds(
origin: OriginFor<T>,
shard: ShardIdentifier,
Expand All @@ -189,7 +189,7 @@ pub mod pallet {

/// Sent by enclaves only as a result of an `unshield` request from a client to an enclave.
#[pallet::call_index(3)]
#[pallet::weight((1000, DispatchClass::Normal, Pays::No))]
#[pallet::weight((<T as Config>::WeightInfo::unshield_funds(), DispatchClass::Normal, Pays::Yes))]
pub fn unshield_funds(
origin: OriginFor<T>,
shard: ShardIdentifier,
Expand Down Expand Up @@ -274,7 +274,7 @@ pub mod pallet {
/// If no previous config exists, the `enactment_delay` parameter will be ignored
/// and the `shard_config` will be active immediately
#[pallet::call_index(5)]
#[pallet::weight((1000, DispatchClass::Normal, Pays::No))]
#[pallet::weight((<T as Config>::WeightInfo::update_shard_config(), DispatchClass::Normal, Pays::Yes))]
pub fn update_shard_config(
origin: OriginFor<T>,
shard: ShardIdentifier,
Expand Down
8 changes: 4 additions & 4 deletions teeracle/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ pub mod pallet {
#[pallet::call]
impl<T: Config> Pallet<T> {
#[pallet::call_index(0)]
#[pallet::weight(<T as Config>::WeightInfo::add_to_whitelist())]
#[pallet::weight((<T as Config>::WeightInfo::add_to_whitelist(), DispatchClass::Normal, Pays::Yes))]
pub fn add_to_whitelist(
origin: OriginFor<T>,
data_source: DataSource,
Expand All @@ -156,7 +156,7 @@ pub mod pallet {
Ok(())
}
#[pallet::call_index(1)]
#[pallet::weight(<T as Config>::WeightInfo::remove_from_whitelist())]
#[pallet::weight((<T as Config>::WeightInfo::remove_from_whitelist(), DispatchClass::Normal, Pays::Yes))]
pub fn remove_from_whitelist(
origin: OriginFor<T>,
data_source: DataSource,
Expand All @@ -175,7 +175,7 @@ pub mod pallet {
}

#[pallet::call_index(2)]
#[pallet::weight(<T as Config>::WeightInfo::update_oracle())]
#[pallet::weight((<T as Config>::WeightInfo::update_oracle(), DispatchClass::Normal, Pays::Yes))]
pub fn update_oracle(
origin: OriginFor<T>,
oracle_name: OracleDataName,
Expand Down Expand Up @@ -206,7 +206,7 @@ pub mod pallet {
}

#[pallet::call_index(3)]
#[pallet::weight(<T as Config>::WeightInfo::update_exchange_rate())]
#[pallet::weight((<T as Config>::WeightInfo::update_exchange_rate(), DispatchClass::Normal, Pays::Yes))]
pub fn update_exchange_rate(
origin: OriginFor<T>,
data_source: DataSource,
Expand Down

0 comments on commit 8de46ff

Please sign in to comment.