Postpone public key creation in the test GenesisStorageBuilder (#14142)

* Postpone public key creation from account id in the test genesis storage builder

* Store raw sr25519 in substrate test pallet

* Nitpick
This commit is contained in:
Davide Galassi
2023-05-15 13:56:52 +02:00
committed by GitHub
parent c830bba300
commit 0b0bef5cb1
5 changed files with 40 additions and 31 deletions
@@ -21,8 +21,8 @@
//! functioning runtime. Some calls are allowed to be submitted as unsigned extrinsics, however most
//! of them requires signing. Refer to `pallet::Call` for further details.
use crate::AuthorityId;
use frame_support::{pallet_prelude::*, storage};
use sp_core::sr25519::Public;
use sp_runtime::transaction_validity::{
InvalidTransaction, TransactionSource, TransactionValidity, ValidTransaction,
};
@@ -49,12 +49,12 @@ pub mod pallet {
#[pallet::storage]
#[pallet::getter(fn authorities)]
pub type Authorities<T> = StorageValue<_, Vec<AuthorityId>, ValueQuery>;
pub type Authorities<T> = StorageValue<_, Vec<Public>, ValueQuery>;
#[pallet::genesis_config]
#[cfg_attr(feature = "std", derive(Default))]
pub struct GenesisConfig {
pub authorities: Vec<AuthorityId>,
pub authorities: Vec<Public>,
}
#[pallet::genesis_build]