Skip to content

Commit

Permalink
fix(upgrade-runtime-controller): replace usage of Pallet::members wit…
Browse files Browse the repository at this point in the history
…h Members::get for consistency
  • Loading branch information
deblanco committed Dec 18, 2024
1 parent 8565011 commit df562db
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions precompiles/upgrade-runtime-controller/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ mod tests;

use core::str::FromStr;
use fp_evm::PrecompileHandle;
use frame_support::dispatch::{Dispatchable, GetDispatchInfo, PostDispatchInfo};
use frame_support::dispatch::{GetDispatchInfo, PostDispatchInfo};
use sp_runtime::traits::Dispatchable;

use frame_support::parameter_types;
use frame_support::storage::types::{StorageValue, ValueQuery};
Expand Down Expand Up @@ -249,7 +250,7 @@ where
let member_id: H160 = member.into();

let old_members =
pallet_collective::Pallet::<Runtime, pallet_collective::Instance1>::members();
pallet_collective::Members::<Runtime, pallet_collective::Instance1>::get();

if old_members.contains(&member_id.into()) {
return Err(revert("already a member"));
Expand Down Expand Up @@ -299,7 +300,7 @@ where
let member_account = <Runtime as frame_system::Config>::AccountId::from(member_id);

let old_members =
pallet_collective::Pallet::<Runtime, pallet_collective::Instance1>::members();
pallet_collective::Members::<Runtime, pallet_collective::Instance1>::get();

if !old_members.contains(&member_account) {
return Err(revert("not a member"));
Expand Down Expand Up @@ -336,7 +337,7 @@ where
) -> EvmResult<Vec<Address>> {
handle.record_cost(RuntimeHelper::<Runtime>::db_read_gas_cost())?;

let members = pallet_collective::Pallet::<Runtime, pallet_collective::Instance1>::members();
let members = pallet_collective::Members::<Runtime, pallet_collective::Instance1>::get();

Ok(members
.iter()
Expand Down

0 comments on commit df562db

Please sign in to comment.