mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-29 02:07:56 +00:00
RPC: expose chain spec properties (#1104)
* Add properties to chain spec * Read properties as serde_json::Value * Use a serde json::map::Map directly for properties * Add type alias for json Map * Update chain_spec.rs
This commit is contained in:
@@ -27,6 +27,9 @@ impl SystemApi for () {
|
||||
fn system_chain(&self) -> Result<String> {
|
||||
Ok("testchain".into())
|
||||
}
|
||||
fn system_properties(&self) -> Result<serde_json::map::Map<String, serde_json::Value>> {
|
||||
Ok(serde_json::map::Map::new())
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -52,3 +55,11 @@ fn system_chain_works() {
|
||||
"testchain".to_owned()
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn system_properties_works() {
|
||||
assert_eq!(
|
||||
SystemApi::system_properties(&()).unwrap(),
|
||||
serde_json::map::Map::new()
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user