@@ -5,6 +5,7 @@ use std::time::Duration;
55use crate :: prelude:: * ;
66use indexer_rabbitmq:: geyser:: { Message , SlotStatistics } ;
77use solana_sdk:: message:: compiled_instruction:: CompiledInstruction ;
8+ use solana_sdk:: message:: AccountKeys ;
89use solana_transaction:: versioned:: VersionedTransaction ;
910use solana_transaction_status:: TransactionStatusMeta ;
1011
@@ -254,7 +255,7 @@ fn process_slot(
254255 }
255256
256257 let msg = & vtx. message ;
257- let keys = msg. static_account_keys ( ) ;
258+ let account_keys = AccountKeys :: new ( msg. static_account_keys ( ) , Some ( & meta . loaded_addresses ) ) ;
258259
259260 let inner_ixs: Vec < ( & Pubkey , & CompiledInstruction ) > = meta
260261 . inner_instructions
@@ -263,7 +264,7 @@ fn process_slot(
263264 ixss. iter ( ) . flat_map ( |ixs| {
264265 ixs. instructions . iter ( ) . map ( |ix| {
265266 (
266- & keys [ ix. instruction . program_id_index as usize ] ,
267+ & account_keys [ ix. instruction . program_id_index as usize ] ,
267268 & ix. instruction ,
268269 )
269270 } )
@@ -274,7 +275,7 @@ fn process_slot(
274275 let top_level_ixs = msg
275276 . instructions ( )
276277 . iter ( )
277- . map ( |ix| ( & keys [ ix. program_id_index as usize ] , ix) ) ;
278+ . map ( |ix| ( & account_keys [ ix. program_id_index as usize ] , ix) ) ;
278279
279280 let all_ixs = top_level_ixs. chain ( inner_ixs) ;
280281 for ( pgm_ref, ix_ref) in all_ixs {
@@ -306,7 +307,7 @@ fn process_slot(
306307 //initialize account
307308 1 | 16 | 18 => {
308309 if ix_ref. accounts . len ( ) > 1 {
309- let mint = keys [ ix_ref. accounts [ 1 ] as usize ] . to_string ( ) ;
310+ let mint = account_keys [ ix_ref. accounts [ 1 ] as usize ] . to_string ( ) ;
310311 let val = stats. new_token_accounts . entry ( mint) . or_default ( ) ;
311312 * val += 1 ;
312313 }
@@ -317,5 +318,5 @@ fn process_slot(
317318 }
318319 }
319320
320- stats. payers . insert ( keys [ 0 ] . to_string ( ) ) ;
321+ stats. payers . insert ( account_keys [ 0 ] . to_string ( ) ) ;
321322}
0 commit comments