File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -175,22 +175,18 @@ impl LookupTablesGet for RpcClient {
175175 . expect ( "Failed to deserialize lookup data" )
176176 . lookup_tables ;
177177
178- let mut lookup_tables: Vec < AddressLookupTableAccount > = vec ! [ ] ;
179-
180- for key in lookup_keys {
178+ let lookup_tables = futures:: future:: join_all ( lookup_keys. iter ( ) . map ( |key| async move {
181179 let raw_account = self
182- . get_account ( & key)
180+ . get_account ( key)
183181 . await
184182 . expect ( "Could not fetch Address Lookup Table account" ) ;
185183 let address_lookup_table = AddressLookupTable :: deserialize ( & raw_account. data )
186184 . expect ( "Could not deserialise Address Lookup Table" ) ;
187- let address_lookup_table_account = AddressLookupTableAccount {
188- key,
185+ AddressLookupTableAccount {
186+ key : * key ,
189187 addresses : address_lookup_table. addresses . to_vec ( ) ,
190- } ;
191-
192- lookup_tables. push ( address_lookup_table_account)
193- }
188+ }
189+ } ) ) . await ;
194190
195191 return Ok ( lookup_tables) ;
196192 }
You can’t perform that action at this time.
0 commit comments