Modify doublemap syntax (#4576)

* modify doublemap syntax

* Apply suggestions from code review

Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com>

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
thiolliere
2020-01-10 11:52:56 +01:00
committed by Gavin Wood
parent 3d74b9b669
commit b74c88b3cc
15 changed files with 41 additions and 40 deletions
+3 -4
View File
@@ -233,13 +233,12 @@ decl_storage! {
/// For each session index, we keep a mapping of `AuthIndex`
/// to `offchain::OpaqueNetworkState`.
ReceivedHeartbeats get(fn received_heartbeats): double_map SessionIndex,
blake2_256(AuthIndex) => Option<Vec<u8>>;
ReceivedHeartbeats get(fn received_heartbeats): double_map SessionIndex, AuthIndex
=> Option<Vec<u8>>;
/// For each session index, we keep a mapping of `T::ValidatorId` to the
/// number of blocks authored by the given authority.
AuthoredBlocks get(fn authored_blocks): double_map SessionIndex,
blake2_256(T::ValidatorId) => u32;
AuthoredBlocks get(fn authored_blocks): double_map SessionIndex, T::ValidatorId => u32;
}
add_extra_genesis {
config(keys): Vec<T::AuthorityId>;