Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove deprecated getter #440

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions test-utils/runtime/src/cord_test_pallet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,7 @@ pub mod pallet {
#[pallet::config]
pub trait Config: frame_system::Config {}

/* TODO:: Remove deprecated getter call, instead use Authorities<Type>::get() */
#[pallet::storage]
#[pallet::getter(fn authorities)]
pub type Authorities<T> = StorageValue<_, Vec<Public>, ValueQuery>;

#[pallet::genesis_config]
Expand Down
8 changes: 2 additions & 6 deletions test-utils/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ pub type AuraId = sp_consensus_aura::sr25519::AuthorityId;
#[cfg(feature = "std")]
pub use extrinsic::{ExtrinsicBuilder, Transfer};

//use crate::cord_test_pallet::Authorities;
pub use crate::cord_test_pallet::Authorities;

const LOG_TARGET: &str = "cord-test-runtime";

Expand Down Expand Up @@ -631,12 +631,8 @@ impl_runtime_apis! {
sp_consensus_aura::SlotDuration::from_millis(1000)
}

/* TODO:: Remove deprecated way of accessing storage through getter,
* instead use Authorities<Type>::get().
* Currently type resolution is failing to fulfill above.
*/
fn authorities() -> Vec<AuraId> {
CordTest::authorities().into_iter().map(AuraId::from).collect()
Authorities::<CordTest>::get().into_iter().map(AuraId::from).collect()
}
}

Expand Down
Loading