mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-15 13:51:11 +00:00
Use EncodeLike for storages traits (#3676)
* impl * patch * lock * some refactor * some avoided copy * new api without ref for doublemap * fix * version bump * fix * point to incoming release * use codec latest * bumpd impl version * fix unused * fix * Update srml/support/src/storage/mod.rs Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
committed by
Bastian Köcher
parent
83d4764d46
commit
53e0ddee4e
@@ -29,13 +29,13 @@
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
|
||||
use app_crypto::RuntimeAppPublic;
|
||||
use codec::{Decode, Encode};
|
||||
use codec::FullCodec;
|
||||
use rstd::prelude::*;
|
||||
use support::{decl_module, decl_storage};
|
||||
|
||||
/// The module's config trait.
|
||||
pub trait Trait: system::Trait + session::Trait {
|
||||
type AuthorityId: RuntimeAppPublic + Default + Decode + Encode + PartialEq;
|
||||
type AuthorityId: RuntimeAppPublic + Default + FullCodec + PartialEq;
|
||||
}
|
||||
|
||||
decl_storage! {
|
||||
@@ -102,7 +102,7 @@ impl<T: Trait> Module<T> {
|
||||
fn initialize_keys(keys: &[T::AuthorityId]) {
|
||||
if !keys.is_empty() {
|
||||
assert!(Keys::<T>::get().is_empty(), "Keys are already initialized!");
|
||||
Keys::<T>::put_ref(keys);
|
||||
Keys::<T>::put(keys);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user