mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 19:21:13 +00:00
Define ss58 prefix inside the runtime (#7810)
* Add SS58Prefix type to the frame_system config trait * Remove unused chain_id runtime interface
This commit is contained in:
committed by
GitHub
parent
bd48ff310d
commit
ec2c70396e
@@ -170,9 +170,6 @@ pub trait Externalities: ExtensionStore {
|
||||
value: Option<Vec<u8>>,
|
||||
);
|
||||
|
||||
/// Get the identity of the chain.
|
||||
fn chain_id(&self) -> u64;
|
||||
|
||||
/// Get the trie root of the current storage map.
|
||||
///
|
||||
/// This will also update all child storage keys in the top-level storage map.
|
||||
|
||||
@@ -388,11 +388,6 @@ pub trait Trie {
|
||||
/// Interface that provides miscellaneous functions for communicating between the runtime and the node.
|
||||
#[runtime_interface]
|
||||
pub trait Misc {
|
||||
/// The current relay chain identifier.
|
||||
fn chain_id(&self) -> u64 {
|
||||
sp_externalities::Externalities::chain_id(*self)
|
||||
}
|
||||
|
||||
/// Print a number.
|
||||
fn print_num(val: u64) {
|
||||
log::debug!(target: "runtime", "{}", val);
|
||||
|
||||
@@ -263,8 +263,6 @@ impl Externalities for BasicExternalities {
|
||||
crate::ext::StorageAppend::new(current).append(value);
|
||||
}
|
||||
|
||||
fn chain_id(&self) -> u64 { 42 }
|
||||
|
||||
fn storage_root(&mut self) -> Vec<u8> {
|
||||
let mut top = self.inner.top.clone();
|
||||
let prefixed_keys: Vec<_> = self.inner.children_default.iter().map(|(_k, v)| {
|
||||
|
||||
@@ -507,10 +507,6 @@ where
|
||||
StorageAppend::new(current_value).append(value);
|
||||
}
|
||||
|
||||
fn chain_id(&self) -> u64 {
|
||||
42
|
||||
}
|
||||
|
||||
fn storage_root(&mut self) -> Vec<u8> {
|
||||
let _guard = guard();
|
||||
if let Some(ref root) = self.storage_transaction_cache.transaction_storage_root {
|
||||
|
||||
@@ -156,8 +156,6 @@ impl<'a, H: Hasher, B: 'a + Backend<H>> Externalities for ReadOnlyExternalities<
|
||||
unimplemented!("storage_append is not supported in ReadOnlyExternalities")
|
||||
}
|
||||
|
||||
fn chain_id(&self) -> u64 { 42 }
|
||||
|
||||
fn storage_root(&mut self) -> Vec<u8> {
|
||||
unimplemented!("storage_root is not supported in ReadOnlyExternalities")
|
||||
}
|
||||
|
||||
@@ -143,8 +143,6 @@ impl Externalities for AsyncExternalities {
|
||||
panic!("`storage_append`: should not be used in async externalities!")
|
||||
}
|
||||
|
||||
fn chain_id(&self) -> u64 { 42 }
|
||||
|
||||
fn storage_root(&mut self) -> Vec<u8> {
|
||||
panic!("`storage_root`: should not be used in async externalities!")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user