`keyring`: remove `lazy_static` public keys hash maps (#2387)
The `lazy_static` package does not work well in `no-std`: it requires
`spin_no_std` feature, which also will propagate into `std` if enabled.
This is not what we want.
This PR removes public/private key hash-maps and replaces them with
simple static byte arrays.
`&T` versions of `AsRef/Deref/From` traits implementation were removed.
Little const helper for converting hex strings into array during compile
time was also added. (somewhat similar to _hex_literal_).
---------
Co-authored-by: command-bot <>
Co-authored-by:
Koute <koute@users.noreply.github.com>
Showing
- Cargo.lock 0 additions, 1 deletionCargo.lock
- substrate/primitives/core/src/const_hex2array.rs 162 additions, 0 deletionssubstrate/primitives/core/src/const_hex2array.rs
- substrate/primitives/core/src/lib.rs 1 addition, 0 deletionssubstrate/primitives/core/src/lib.rs
- substrate/primitives/keyring/Cargo.toml 0 additions, 1 deletionsubstrate/primitives/keyring/Cargo.toml
- substrate/primitives/keyring/src/bandersnatch.rs 26 additions, 43 deletionssubstrate/primitives/keyring/src/bandersnatch.rs
- substrate/primitives/keyring/src/ed25519.rs 39 additions, 39 deletionssubstrate/primitives/keyring/src/ed25519.rs
- substrate/primitives/keyring/src/sr25519.rs 38 additions, 38 deletionssubstrate/primitives/keyring/src/sr25519.rs
Please register or sign in to comment