mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 18:41:05 +00:00
Normalize Crate Names in SRML/Node Template (#3543)
* Fix some instances of `runtime-io` * Patch a bunch * More patches for consistancy * more patch * Fix various build issues * Fix tests * Patch `srml-support-*` crates * Fix doc tests * Revert "Fix doc tests" This reverts commit ba2ec61da7acc36821a70e76a31a6a5bf13bbe95. * Revert "Patch `srml-support-*` crates" This reverts commit 9a6070450107dec17784ba34af4b871023f6dc81. * Missed one * Fix doc tests
This commit is contained in:
@@ -10,7 +10,7 @@ primitives = { package = "substrate-primitives", path = "../primitives", default
|
||||
codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] }
|
||||
serde = { version = "1.0", optional = true, features = ["derive"] }
|
||||
rstd = { package = "sr-std", path = "../sr-std", default-features = false }
|
||||
rio = { package = "sr-io", path = "../sr-io", default-features = false }
|
||||
runtime-io = { package = "sr-io", path = "../sr-io", default-features = false }
|
||||
|
||||
[dev-dependencies]
|
||||
test-client = { package = "substrate-test-runtime-client", path = "../test-runtime/client" }
|
||||
@@ -18,4 +18,4 @@ sr-primitives = { path = "../sr-primitives" }
|
||||
|
||||
[features]
|
||||
default = [ "std" ]
|
||||
std = [ "primitives/std", "codec/std", "serde", "rstd/std", "rio/std" ]
|
||||
std = [ "primitives/std", "codec/std", "serde", "rstd/std", "runtime-io/std" ]
|
||||
|
||||
@@ -34,19 +34,19 @@ impl RuntimePublic for Public {
|
||||
type Signature = Signature;
|
||||
|
||||
fn all(key_type: KeyTypeId) -> crate::Vec<Self> {
|
||||
rio::ed25519_public_keys(key_type)
|
||||
runtime_io::ed25519_public_keys(key_type)
|
||||
}
|
||||
|
||||
fn generate_pair(key_type: KeyTypeId, seed: Option<&str>) -> Self {
|
||||
rio::ed25519_generate(key_type, seed)
|
||||
runtime_io::ed25519_generate(key_type, seed)
|
||||
}
|
||||
|
||||
fn sign<M: AsRef<[u8]>>(&self, key_type: KeyTypeId, msg: &M) -> Option<Self::Signature> {
|
||||
rio::ed25519_sign(key_type, self, msg)
|
||||
runtime_io::ed25519_sign(key_type, self, msg)
|
||||
}
|
||||
|
||||
fn verify<M: AsRef<[u8]>>(&self, msg: &M, signature: &Self::Signature) -> bool {
|
||||
rio::ed25519_verify(&signature, msg.as_ref(), self)
|
||||
runtime_io::ed25519_verify(&signature, msg.as_ref(), self)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -34,19 +34,19 @@ impl RuntimePublic for Public {
|
||||
type Signature = Signature;
|
||||
|
||||
fn all(key_type: KeyTypeId) -> crate::Vec<Self> {
|
||||
rio::sr25519_public_keys(key_type)
|
||||
runtime_io::sr25519_public_keys(key_type)
|
||||
}
|
||||
|
||||
fn generate_pair(key_type: KeyTypeId, seed: Option<&str>) -> Self {
|
||||
rio::sr25519_generate(key_type, seed)
|
||||
runtime_io::sr25519_generate(key_type, seed)
|
||||
}
|
||||
|
||||
fn sign<M: AsRef<[u8]>>(&self, key_type: KeyTypeId, msg: &M) -> Option<Self::Signature> {
|
||||
rio::sr25519_sign(key_type, self, msg)
|
||||
runtime_io::sr25519_sign(key_type, self, msg)
|
||||
}
|
||||
|
||||
fn verify<M: AsRef<[u8]>>(&self, msg: &M, signature: &Self::Signature) -> bool {
|
||||
rio::sr25519_verify(&signature, msg.as_ref(), self)
|
||||
runtime_io::sr25519_verify(&signature, msg.as_ref(), self)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user