mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 03:01:07 +00:00
Add Edgeware network ID to core/crypto and subkey (#4426)
* Add linear back-off for aura slot workers * logging * Use slot from header * Get network id for Edgeware and add to subkey
This commit is contained in:
@@ -165,7 +165,7 @@ fn get_app<'a, 'b>() -> App<'a, 'b> {
|
||||
-k, --secp256k1 'Use SECP256k1/ECDSA/BIP39 cryptography'
|
||||
-s, --sr25519 'Use Schnorr/Ristretto x25519/BIP39 cryptography'
|
||||
[network] -n, --network <network> 'Specify a network. One of substrate \
|
||||
(default), polkadot, kusama, dothereum, or kulupu'
|
||||
(default), polkadot, kusama, dothereum, edgeware, or kulupu'
|
||||
[password] -p, --password <password> 'The password for the key'
|
||||
")
|
||||
.subcommands(vec![
|
||||
@@ -244,7 +244,7 @@ where
|
||||
let maybe_network: Option<Ss58AddressFormat> = matches.value_of("network").map(|network| {
|
||||
network
|
||||
.try_into()
|
||||
.expect("Invalid network name: must be polkadot/substrate/kusama/dothereum")
|
||||
.expect("Invalid network name: must be polkadot/substrate/kusama/dothereum/edgeware")
|
||||
});
|
||||
if let Some(network) = maybe_network {
|
||||
set_default_ss58_version(network);
|
||||
|
||||
@@ -268,6 +268,7 @@ pub trait Ss58Codec: Sized + AsMut<[u8]> + AsRef<[u8]> + Default {
|
||||
Ss58AddressFormat::PolkadotAccountDirect => Ok(r),
|
||||
Ss58AddressFormat::KusamaAccountDirect => Ok(r),
|
||||
Ss58AddressFormat::DothereumAccountDirect => Ok(r),
|
||||
Ss58AddressFormat::EdgewareAccountDirect => Ok(r),
|
||||
v if v == *DEFAULT_VERSION.lock() => Ok(r),
|
||||
_ => Err(PublicError::UnknownVersion),
|
||||
})
|
||||
@@ -301,6 +302,7 @@ pub trait Ss58Codec: Sized + AsMut<[u8]> + AsRef<[u8]> + Default {
|
||||
Ss58AddressFormat::PolkadotAccountDirect => Ok(r),
|
||||
Ss58AddressFormat::KusamaAccountDirect => Ok(r),
|
||||
Ss58AddressFormat::DothereumAccountDirect => Ok(r),
|
||||
Ss58AddressFormat::EdgewareAccountDirect => Ok(r),
|
||||
v if v == *DEFAULT_VERSION.lock() => Ok(r),
|
||||
_ => Err(PublicError::UnknownVersion),
|
||||
})
|
||||
@@ -432,6 +434,8 @@ ss58_address_format!(
|
||||
(20, "dothereum", "Dothereum Para-chain, direct checksum, standard account (*25519).")
|
||||
KulupuAccountDirect =>
|
||||
(16, "kulupu", "Kulupu mainnet, direct checksum, standard account (*25519).")
|
||||
EdgewareAccountDirect =>
|
||||
(7, "edgeware", "Edgeware mainnet, direct checksum, standard account (*25519).")
|
||||
);
|
||||
|
||||
/// Set the default "version" (actually, this is a bit of a misnomer and the version byte is
|
||||
@@ -441,6 +445,7 @@ ss58_address_format!(
|
||||
/// Current known "versions" are:
|
||||
/// - 0 direct (payload) checksum for 32-byte *25519 Polkadot addresses.
|
||||
/// - 2 direct (payload) checksum for 32-byte *25519 Kusama addresses.
|
||||
/// - 7 direct (payload) checksum for 32-byte *25519 Edgeware addresses.
|
||||
/// - 20 direct (payload) checksum for 32-byte *25519 Dothereum addresses.
|
||||
/// - 42 direct (payload) checksum for 32-byte *25519 addresses on any Substrate-based network.
|
||||
#[cfg(feature = "std")]
|
||||
|
||||
Reference in New Issue
Block a user