@@ -95,7 +95,7 @@ async fn archive_genesis() {
9595 let ( _client, api) = setup_api ( ) ;
9696
9797 let genesis: String =
98- api. call ( "archive_unstable_genesisHash " , EmptyParams :: new ( ) ) . await . unwrap ( ) ;
98+ api. call ( "archive_v1_genesisHash " , EmptyParams :: new ( ) ) . await . unwrap ( ) ;
9999 assert_eq ! ( genesis, hex_string( & CHAIN_GENESIS ) ) ;
100100}
101101
@@ -105,7 +105,7 @@ async fn archive_body() {
105105
106106 // Invalid block hash.
107107 let invalid_hash = hex_string ( & INVALID_HASH ) ;
108- let res: Option < Vec < String > > = api. call ( "archive_unstable_body " , [ invalid_hash] ) . await . unwrap ( ) ;
108+ let res: Option < Vec < String > > = api. call ( "archive_v1_body " , [ invalid_hash] ) . await . unwrap ( ) ;
109109 assert ! ( res. is_none( ) ) ;
110110
111111 // Import a new block with an extrinsic.
@@ -129,7 +129,7 @@ async fn archive_body() {
129129
130130 let expected_tx = hex_string ( & block. extrinsics [ 0 ] . encode ( ) ) ;
131131
132- let body: Vec < String > = api. call ( "archive_unstable_body " , [ block_hash] ) . await . unwrap ( ) ;
132+ let body: Vec < String > = api. call ( "archive_v1_body " , [ block_hash] ) . await . unwrap ( ) ;
133133 assert_eq ! ( vec![ expected_tx] , body) ;
134134}
135135
@@ -139,7 +139,7 @@ async fn archive_header() {
139139
140140 // Invalid block hash.
141141 let invalid_hash = hex_string ( & INVALID_HASH ) ;
142- let res: Option < String > = api. call ( "archive_unstable_header " , [ invalid_hash] ) . await . unwrap ( ) ;
142+ let res: Option < String > = api. call ( "archive_v1_header " , [ invalid_hash] ) . await . unwrap ( ) ;
143143 assert ! ( res. is_none( ) ) ;
144144
145145 // Import a new block with an extrinsic.
@@ -161,7 +161,7 @@ async fn archive_header() {
161161 let block_hash = format ! ( "{:?}" , block. header. hash( ) ) ;
162162 client. import ( BlockOrigin :: Own , block. clone ( ) ) . await . unwrap ( ) ;
163163
164- let header: String = api. call ( "archive_unstable_header " , [ block_hash] ) . await . unwrap ( ) ;
164+ let header: String = api. call ( "archive_v1_header " , [ block_hash] ) . await . unwrap ( ) ;
165165 let bytes = array_bytes:: hex2bytes ( & header) . unwrap ( ) ;
166166 let header: Header = Decode :: decode ( & mut & bytes[ ..] ) . unwrap ( ) ;
167167 assert_eq ! ( header, block. header) ;
@@ -174,7 +174,7 @@ async fn archive_finalized_height() {
174174 let client_height: u32 = client. info ( ) . finalized_number . saturated_into ( ) ;
175175
176176 let height: u32 =
177- api. call ( "archive_unstable_finalizedHeight " , EmptyParams :: new ( ) ) . await . unwrap ( ) ;
177+ api. call ( "archive_v1_finalizedHeight " , EmptyParams :: new ( ) ) . await . unwrap ( ) ;
178178
179179 assert_eq ! ( client_height, height) ;
180180}
@@ -184,7 +184,7 @@ async fn archive_hash_by_height() {
184184 let ( client, api) = setup_api ( ) ;
185185
186186 // Genesis height.
187- let hashes: Vec < String > = api. call ( "archive_unstable_hashByHeight " , [ 0 ] ) . await . unwrap ( ) ;
187+ let hashes: Vec < String > = api. call ( "archive_v1_hashByHeight " , [ 0 ] ) . await . unwrap ( ) ;
188188 assert_eq ! ( hashes, vec![ format!( "{:?}" , client. genesis_hash( ) ) ] ) ;
189189
190190 // Block tree:
@@ -260,28 +260,28 @@ async fn archive_hash_by_height() {
260260 client. import ( BlockOrigin :: Own , block_4. clone ( ) ) . await . unwrap ( ) ;
261261
262262 // Check finalized height.
263- let hashes: Vec < String > = api. call ( "archive_unstable_hashByHeight " , [ 1 ] ) . await . unwrap ( ) ;
263+ let hashes: Vec < String > = api. call ( "archive_v1_hashByHeight " , [ 1 ] ) . await . unwrap ( ) ;
264264 assert_eq ! ( hashes, vec![ format!( "{:?}" , finalized_hash) ] ) ;
265265
266266 // Test nonfinalized heights.
267267 // Height N must include block 1.
268268 let mut height = block_1. header . number ;
269- let hashes: Vec < String > = api. call ( "archive_unstable_hashByHeight " , [ height] ) . await . unwrap ( ) ;
269+ let hashes: Vec < String > = api. call ( "archive_v1_hashByHeight " , [ height] ) . await . unwrap ( ) ;
270270 assert_eq ! ( hashes, vec![ format!( "{:?}" , block_1_hash) ] ) ;
271271
272272 // Height (N + 1) must include block 2 and 4.
273273 height += 1 ;
274- let hashes: Vec < String > = api. call ( "archive_unstable_hashByHeight " , [ height] ) . await . unwrap ( ) ;
274+ let hashes: Vec < String > = api. call ( "archive_v1_hashByHeight " , [ height] ) . await . unwrap ( ) ;
275275 assert_eq ! ( hashes, vec![ format!( "{:?}" , block_4_hash) , format!( "{:?}" , block_2_hash) ] ) ;
276276
277277 // Height (N + 2) must include block 3.
278278 height += 1 ;
279- let hashes: Vec < String > = api. call ( "archive_unstable_hashByHeight " , [ height] ) . await . unwrap ( ) ;
279+ let hashes: Vec < String > = api. call ( "archive_v1_hashByHeight " , [ height] ) . await . unwrap ( ) ;
280280 assert_eq ! ( hashes, vec![ format!( "{:?}" , block_3_hash) ] ) ;
281281
282282 // Height (N + 3) has no blocks.
283283 height += 1 ;
284- let hashes: Vec < String > = api. call ( "archive_unstable_hashByHeight " , [ height] ) . await . unwrap ( ) ;
284+ let hashes: Vec < String > = api. call ( "archive_v1_hashByHeight " , [ height] ) . await . unwrap ( ) ;
285285 assert ! ( hashes. is_empty( ) ) ;
286286}
287287
@@ -293,7 +293,7 @@ async fn archive_call() {
293293 // Invalid parameter (non-hex).
294294 let err = api
295295 . call :: < _ , serde_json:: Value > (
296- "archive_unstable_call " ,
296+ "archive_v1_call " ,
297297 [ & invalid_hash, "BabeApi_current_epoch" , "0x00X" ] ,
298298 )
299299 . await
@@ -303,7 +303,7 @@ async fn archive_call() {
303303 // Pass an invalid parameters that cannot be decode.
304304 let err = api
305305 . call :: < _ , serde_json:: Value > (
306- "archive_unstable_call " ,
306+ "archive_v1_call " ,
307307 // 0x0 is invalid.
308308 [ & invalid_hash, "BabeApi_current_epoch" , "0x0" ] ,
309309 )
@@ -313,7 +313,7 @@ async fn archive_call() {
313313
314314 // Invalid hash.
315315 let result: MethodResult = api
316- . call ( "archive_unstable_call " , [ & invalid_hash, "BabeApi_current_epoch" , "0x00" ] )
316+ . call ( "archive_v1_call " , [ & invalid_hash, "BabeApi_current_epoch" , "0x00" ] )
317317 . await
318318 . unwrap ( ) ;
319319 assert_matches ! ( result, MethodResult :: Err ( _) ) ;
@@ -335,7 +335,7 @@ async fn archive_call() {
335335 let call_parameters = hex_string ( & alice_id. encode ( ) ) ;
336336 let result: MethodResult = api
337337 . call (
338- "archive_unstable_call " ,
338+ "archive_v1_call " ,
339339 [ & format ! ( "{:?}" , block_1_hash) , "AccountNonceApi_account_nonce" , & call_parameters] ,
340340 )
341341 . await
@@ -368,7 +368,7 @@ async fn archive_storage_hashes_values() {
368368 ] ;
369369
370370 let mut sub = api
371- . subscribe_unbounded ( "archive_unstable_storage " , rpc_params ! [ & block_hash, items. clone( ) ] )
371+ . subscribe_unbounded ( "archive_v1_storage " , rpc_params ! [ & block_hash, items. clone( ) ] )
372372 . await
373373 . unwrap ( ) ;
374374
@@ -393,7 +393,7 @@ async fn archive_storage_hashes_values() {
393393 let expected_value = hex_string ( & VALUE ) ;
394394
395395 let mut sub = api
396- . subscribe_unbounded ( "archive_unstable_storage " , rpc_params ! [ & block_hash, items] )
396+ . subscribe_unbounded ( "archive_v1_storage " , rpc_params ! [ & block_hash, items] )
397397 . await
398398 . unwrap ( ) ;
399399
@@ -456,7 +456,7 @@ async fn archive_storage_hashes_values_child_trie() {
456456 ] ;
457457 let mut sub = api
458458 . subscribe_unbounded (
459- "archive_unstable_storage " ,
459+ "archive_v1_storage " ,
460460 rpc_params ! [ & genesis_hash, items, & child_info] ,
461461 )
462462 . await
@@ -502,7 +502,7 @@ async fn archive_storage_closest_merkle_value() {
502502 ) -> HashMap < String , String > {
503503 let mut sub = api
504504 . subscribe_unbounded (
505- "archive_unstable_storage " ,
505+ "archive_v1_storage " ,
506506 rpc_params ! [
507507 & block_hash,
508508 vec![
@@ -664,7 +664,7 @@ async fn archive_storage_iterations() {
664664 let invalid_hash = hex_string ( & INVALID_HASH ) ;
665665 let mut sub = api
666666 . subscribe_unbounded (
667- "archive_unstable_storage " ,
667+ "archive_v1_storage " ,
668668 rpc_params ! [
669669 & invalid_hash,
670670 vec![ StorageQuery {
@@ -684,7 +684,7 @@ async fn archive_storage_iterations() {
684684 // Valid call with storage at the key.
685685 let mut sub = api
686686 . subscribe_unbounded (
687- "archive_unstable_storage " ,
687+ "archive_v1_storage " ,
688688 rpc_params ! [
689689 & block_hash,
690690 vec![ StorageQuery {
@@ -791,7 +791,7 @@ async fn archive_storage_diff_main_trie() {
791791 ] ;
792792 let mut sub = api
793793 . subscribe_unbounded (
794- "archive_unstable_storageDiff " ,
794+ "archive_v1_storageDiff " ,
795795 rpc_params ! [ & block_hash, items. clone( ) , & prev_hash] ,
796796 )
797797 . await
@@ -894,7 +894,7 @@ async fn archive_storage_diff_no_changes() {
894894 } ] ;
895895 let mut sub = api
896896 . subscribe_unbounded (
897- "archive_unstable_storageDiff " ,
897+ "archive_v1_storageDiff " ,
898898 rpc_params ! [ & block_hash, items. clone( ) , & prev_hash] ,
899899 )
900900 . await
@@ -949,7 +949,7 @@ async fn archive_storage_diff_deleted_changes() {
949949
950950 let mut sub = api
951951 . subscribe_unbounded (
952- "archive_unstable_storageDiff " ,
952+ "archive_v1_storageDiff " ,
953953 rpc_params ! [ & block_hash, items. clone( ) , & prev_hash] ,
954954 )
955955 . await
@@ -979,7 +979,7 @@ async fn archive_storage_diff_invalid_params() {
979979 let items: Vec < ArchiveStorageDiffItem < String > > = Vec :: new ( ) ;
980980 let err = api
981981 . subscribe_unbounded (
982- "archive_unstable_storageDiff " ,
982+ "archive_v1_storageDiff " ,
983983 rpc_params ! [ "123" , items. clone( ) , & invalid_hash] ,
984984 )
985985 . await
@@ -992,7 +992,7 @@ async fn archive_storage_diff_invalid_params() {
992992 let items: Vec < ArchiveStorageDiffItem < String > > = Vec :: new ( ) ;
993993 let mut sub = api
994994 . subscribe_unbounded (
995- "archive_unstable_storageDiff " ,
995+ "archive_v1_storageDiff " ,
996996 rpc_params ! [ & invalid_hash, items. clone( ) , & invalid_hash] ,
997997 )
998998 . await
0 commit comments