From 0f1a5f65146cf545cc4f09f6b15025f3fc01ad10 Mon Sep 17 00:00:00 2001 From: Gavin Wood Date: Tue, 3 Dec 2019 00:49:27 +0100 Subject: [PATCH] Enumeratable dispatches using unhashed index in key. (#4278) --- substrate/bin/node/runtime/src/lib.rs | 2 +- substrate/frame/democracy/src/lib.rs | 2 +- substrate/primitives/sr-version/src/lib.rs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/substrate/bin/node/runtime/src/lib.rs b/substrate/bin/node/runtime/src/lib.rs index ca451db15e..4ba355e8f3 100644 --- a/substrate/bin/node/runtime/src/lib.rs +++ b/substrate/bin/node/runtime/src/lib.rs @@ -78,7 +78,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { // and set impl_version to equal spec_version. If only runtime // implementation changes and behavior does not, then leave spec_version as // is and increment impl_version. - spec_version: 197, + spec_version: 198, impl_version: 198, apis: RUNTIME_API_VERSIONS, }; diff --git a/substrate/frame/democracy/src/lib.rs b/substrate/frame/democracy/src/lib.rs index 54044cd1fa..33fe6453fc 100644 --- a/substrate/frame/democracy/src/lib.rs +++ b/substrate/frame/democracy/src/lib.rs @@ -283,7 +283,7 @@ decl_storage! { map ReferendumIndex => Option<(ReferendumInfo)>; /// Queue of successful referenda to be dispatched. pub DispatchQueue get(fn dispatch_queue): - map T::BlockNumber => Vec>; + map hasher(twox_64_concat) T::BlockNumber => Vec>; /// Get the voters for the current proposal. pub VotersFor get(fn voters_for): map ReferendumIndex => Vec; diff --git a/substrate/primitives/sr-version/src/lib.rs b/substrate/primitives/sr-version/src/lib.rs index b567904b16..edb4aa851e 100644 --- a/substrate/primitives/sr-version/src/lib.rs +++ b/substrate/primitives/sr-version/src/lib.rs @@ -173,8 +173,8 @@ impl NativeVersion { self.runtime_version.spec_name, other.spec_name, )) - } else if (self.runtime_version.authoring_version != other.authoring_version - && !self.can_author_with.contains(&other.authoring_version)) + } else if self.runtime_version.authoring_version != other.authoring_version + && !self.can_author_with.contains(&other.authoring_version) { Err(format!( "`authoring_version` does not match `{version}` vs `{other_version}` and \