Skip to content

Commit f6cd9aa

Browse files
committed
Pass missing dynamic list length to twin admin weight functions
1 parent 9f89f6e commit f6cd9aa

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • substrate-node/pallets/pallet-tfgrid/src

substrate-node/pallets/pallet-tfgrid/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1378,7 +1378,7 @@ pub mod pallet {
13781378

13791379
// Council adds an account to the twin admin list (allowed to deploy on opted-out nodes)
13801380
#[pallet::call_index(44)]
1381-
#[pallet::weight(<T as Config>::WeightInfo::add_twin_admin())]
1381+
#[pallet::weight(<T as Config>::WeightInfo::add_twin_admin(AllowedTwinAdmins::<T>::get().as_ref().map(|v| v.len()).unwrap_or(0) as u32 + 1))]
13821382
pub fn add_twin_admin(
13831383
origin: OriginFor<T>,
13841384
account: T::AccountId,
@@ -1389,7 +1389,7 @@ pub mod pallet {
13891389

13901390
// Council removes an account from the twin admin list
13911391
#[pallet::call_index(45)]
1392-
#[pallet::weight(<T as Config>::WeightInfo::remove_twin_admin())]
1392+
#[pallet::weight(<T as Config>::WeightInfo::remove_twin_admin(AllowedTwinAdmins::<T>::get().as_ref().map(|v| v.len()).unwrap_or(0) as u32 - 1))]
13931393
pub fn remove_twin_admin(
13941394
origin: OriginFor<T>,
13951395
account: T::AccountId,

0 commit comments

Comments
 (0)