Skip to content

Commit

Permalink
- Change the file name as the calls are not unstable anymore (#798)
Browse files Browse the repository at this point in the history
- Given that the calls are stable we don't need to verify that they exist
  • Loading branch information
Niederb authored Sep 2, 2024
1 parent 3453973 commit feafbab
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ jobs:
staking_batch_payout,
subscribe_events,
sudo,
unstable_rpc_api_calls,
new_json_rpc_api_calls,
transfer_with_tungstenite_client,
transfer_with_ws_client,
author_tests,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,25 +48,11 @@ async fn main() {
let json_string = serde_json::to_string(&json_value).unwrap();
println!("Available methods: {json_string} \n");

// Since it's an unstable api and might change anytime, we first check if our calls are still
// available:
let chain_name_request = "chainSpec_v1_chainName";
let chain_genesis_hash_request = "chainSpec_v1_genesisHash";
let transaction_submit_watch = "transactionWatch_v1_submitAndWatch";
let transaction_unwatch = "transactionWatch_v1_unwatch";

let request_vec = [
chain_name_request,
chain_genesis_hash_request,
transaction_submit_watch,
transaction_unwatch,
];
for request in request_vec {
if !json_string.contains(request) {
panic!("Api has changed, please update the call {request}.");
}
}

// Submit the above defiend rpc requests:
let chain_name: String = api.client().request(chain_name_request, rpc_params![]).await.unwrap();
println!("Our chain is called: {chain_name}");
Expand Down

0 comments on commit feafbab

Please sign in to comment.