Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Commit b534b3d

Browse files
committed
Merge branch 'master' into overlay_change
2 parents 7001e8c + 6d48cce commit b534b3d

File tree

66 files changed

+1027
-642
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+1027
-642
lines changed

Cargo.lock

Lines changed: 53 additions & 51 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

core/application-crypto/src/ed25519.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ impl RuntimePublic for Public {
4242
}
4343

4444
fn sign<M: AsRef<[u8]>>(&self, key_type: KeyTypeId, msg: &M) -> Option<Self::Signature> {
45-
runtime_io::ed25519_sign(key_type, self, msg)
45+
runtime_io::ed25519_sign(key_type, self, msg.as_ref())
4646
}
4747

4848
fn verify<M: AsRef<[u8]>>(&self, msg: &M, signature: &Self::Signature) -> bool {

core/application-crypto/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,7 @@ macro_rules! app_crypto {
213213
}
214214

215215
impl $crate::RuntimeAppPublic for Public where $public: $crate::RuntimePublic<Signature=$sig> {
216+
const ID: $crate::KeyTypeId = $key_type;
216217
type Signature = Signature;
217218

218219
fn all() -> $crate::Vec<Self> {

core/application-crypto/src/sr25519.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ impl RuntimePublic for Public {
4242
}
4343

4444
fn sign<M: AsRef<[u8]>>(&self, key_type: KeyTypeId, msg: &M) -> Option<Self::Signature> {
45-
runtime_io::sr25519_sign(key_type, self, msg)
45+
runtime_io::sr25519_sign(key_type, self, msg.as_ref())
4646
}
4747

4848
fn verify<M: AsRef<[u8]>>(&self, msg: &M, signature: &Self::Signature) -> bool {

core/application-crypto/src/traits.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,10 @@ pub trait RuntimePublic: Sized {
9696
}
9797

9898
/// A runtime interface for an application's public key.
99-
pub trait RuntimeAppPublic: Sized {
99+
pub trait RuntimeAppPublic: Sized {
100+
/// An identifier for this application-specific key type.
101+
const ID: KeyTypeId;
102+
100103
/// The signature that will be generated when signing with the corresponding private key.
101104
type Signature: Codec + MaybeDebugHash + Eq + PartialEq + Clone;
102105

core/authority-discovery/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ client = { package = "substrate-client", path = "../../core/client" }
1515
codec = { package = "parity-scale-codec", default-features = false, version = "1.0.3" }
1616
derive_more = "0.14.0"
1717
futures = "0.1"
18-
keystore = { package = "substrate-keystore", path = "../../core/keystore" }
1918
libp2p = { version = "0.12.0", default-features = false, features = ["secp256k1", "libp2p-websocket"] }
2019
log = "0.4"
2120
network = { package = "substrate-network", path = "../../core/network" }

core/cli/src/params.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,9 @@ impl<CC, RP> StructOpt for CoreParams<CC, RP> where
705705
)
706706
.subcommand(
707707
ExportBlocksCmd::augment_clap(SubCommand::with_name("export-blocks"))
708-
.about("Export blocks to a file.")
708+
.about("Export blocks to a file. This file can only be re-imported \
709+
if it is in binary format (not JSON!)."
710+
)
709711
)
710712
.subcommand(
711713
ImportBlocksCmd::augment_clap(SubCommand::with_name("import-blocks"))

core/client/db/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1527,7 +1527,7 @@ mod tests {
15271527
let header = Header {
15281528
number,
15291529
parent_hash,
1530-
state_root: BlakeTwo256::trie_root::<_, &[u8], &[u8]>(Vec::new()),
1530+
state_root: BlakeTwo256::trie_root(Vec::new()),
15311531
digest,
15321532
extrinsics_root,
15331533
};

core/client/src/block_builder/block_builder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ where
128128
debug_assert_eq!(
129129
self.header.extrinsics_root().clone(),
130130
HashFor::<Block>::ordered_trie_root(
131-
self.extrinsics.iter().map(Encode::encode)
131+
self.extrinsics.iter().map(Encode::encode).collect(),
132132
),
133133
);
134134

core/client/src/genesis.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ pub fn construct_genesis_block<
2525
state_root: Block::Hash
2626
) -> Block {
2727
let extrinsics_root = <<<Block as BlockT>::Header as HeaderT>::Hashing as HashT>::trie_root(
28-
std::iter::empty::<(&[u8], &[u8])>(),
28+
Vec::new(),
2929
);
3030

3131
Block::new(

0 commit comments

Comments
 (0)