mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-07 11:57:23 +00:00
chainSpec: Stabilize chainSpec methods to V1 (#1206)
* chainSpec: Stabilize chainSpec methods to V1 Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * chainSpec/api: Remove unstable documentation Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> --------- Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> Co-authored-by: James Wilson <james@jsdw.me>
This commit is contained in:
@@ -36,7 +36,7 @@ fn api() -> RpcModule<ChainSpec> {
|
||||
#[tokio::test]
|
||||
async fn chain_spec_chain_name_works() {
|
||||
let name = api()
|
||||
.call::<_, String>("chainSpec_unstable_chainName", EmptyParams::new())
|
||||
.call::<_, String>("chainSpec_v1_chainName", EmptyParams::new())
|
||||
.await
|
||||
.unwrap();
|
||||
assert_eq!(name, CHAIN_NAME);
|
||||
@@ -45,7 +45,7 @@ async fn chain_spec_chain_name_works() {
|
||||
#[tokio::test]
|
||||
async fn chain_spec_genesis_hash_works() {
|
||||
let genesis = api()
|
||||
.call::<_, String>("chainSpec_unstable_genesisHash", EmptyParams::new())
|
||||
.call::<_, String>("chainSpec_v1_genesisHash", EmptyParams::new())
|
||||
.await
|
||||
.unwrap();
|
||||
assert_eq!(genesis, format!("0x{}", hex::encode(CHAIN_GENESIS)));
|
||||
@@ -54,7 +54,7 @@ async fn chain_spec_genesis_hash_works() {
|
||||
#[tokio::test]
|
||||
async fn chain_spec_properties_works() {
|
||||
let properties = api()
|
||||
.call::<_, Properties>("chainSpec_unstable_properties", EmptyParams::new())
|
||||
.call::<_, Properties>("chainSpec_v1_properties", EmptyParams::new())
|
||||
.await
|
||||
.unwrap();
|
||||
assert_eq!(properties, serde_json::from_str(CHAIN_PROPERTIES).unwrap());
|
||||
|
||||
Reference in New Issue
Block a user