Make AuthorityId generic (#1296)

* BlockAuthorityId convenience type

* Rename AuthorityId -> Ed25519AuthorityId to make it more precise

* Generalize AuthorityId up to substrate-client

* Fix in client-db

* rename: BlockAuthorityId -> AuthorityIdFor

* typo: should be digest item

* Fix test-runtime authorityId mismatch

One states that AuthorityId is u64 while the other states that it's Ed25519AuthorityId.

* Fix more u64 - Ed25519AuthorityId mismatch

* Fix compile of most of the srml modules

* Continue to pin aura and grandpa with ed25519 and fix compile

* Add MaybeHash trait

* Fix node-runtime compile

* Fix network tests
This commit is contained in:
Wei Tang
2019-01-08 11:14:18 +01:00
committed by Benjamin Kampmann
parent 043831cfb0
commit 71d889b692
46 changed files with 234 additions and 216 deletions
+2 -3
View File
@@ -29,9 +29,8 @@ use client;
use client::block_builder::BlockBuilder;
use runtime_primitives::Justification;
use runtime_primitives::generic::BlockId;
use runtime_primitives::traits::{Block as BlockT, Zero};
use runtime_primitives::traits::{Block as BlockT, Zero, AuthorityIdFor};
use io::SyncIo;
use primitives::AuthorityId;
use protocol::{Context, Protocol, ProtocolContext};
use config::ProtocolConfig;
use service::{NetworkLink, TransactionPool};
@@ -92,7 +91,7 @@ impl<B: BlockT> Verifier<B> for PassThroughVerifier {
header: B::Header,
justification: Option<Justification>,
body: Option<Vec<B::Extrinsic>>
) -> Result<(ImportBlock<B>, Option<Vec<AuthorityId>>), String> {
) -> Result<(ImportBlock<B>, Option<Vec<AuthorityIdFor<B>>>), String> {
Ok((ImportBlock {
origin,
header,