disabling alts
This commit is contained in:
parent
af07d199dd
commit
ff0d1ebc8c
|
@ -26,7 +26,10 @@ impl ALTStore {
|
|||
}
|
||||
|
||||
pub async fn load_all_alts(&self) {
|
||||
let get_pa = self.rpc_client.get_program_accounts(&solana_address_lookup_table_program::id()).await;
|
||||
let get_pa = self
|
||||
.rpc_client
|
||||
.get_program_accounts(&solana_address_lookup_table_program::id())
|
||||
.await;
|
||||
if let Ok(pas) = get_pa {
|
||||
for (key, acc) in pas {
|
||||
self.save_account(&key, acc.data());
|
||||
|
|
|
@ -185,17 +185,17 @@ impl BlockInfo {
|
|||
})
|
||||
.collect_vec();
|
||||
if let Some(atl_messages) = message.address_table_lookups() {
|
||||
for atl_message in atl_messages {
|
||||
let atl_acc = atl_message.account_key;
|
||||
let mut atl_accs = atl_store
|
||||
.get_accounts(
|
||||
&atl_acc,
|
||||
&atl_message.writable_indexes,
|
||||
&atl_message.readonly_indexes,
|
||||
)
|
||||
.await;
|
||||
accounts.append(&mut atl_accs);
|
||||
}
|
||||
// for atl_message in atl_messages {
|
||||
// let atl_acc = atl_message.account_key;
|
||||
// let mut atl_accs = atl_store
|
||||
// .get_accounts(
|
||||
// &atl_acc,
|
||||
// &atl_message.writable_indexes,
|
||||
// &atl_message.readonly_indexes,
|
||||
// )
|
||||
// .await;
|
||||
// accounts.append(&mut atl_accs);
|
||||
// }
|
||||
}
|
||||
|
||||
for writable_account in accounts
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
use clap::Parser;
|
||||
use itertools::Itertools;
|
||||
use solana_address_lookup_table_program::state::AddressLookupTable;
|
||||
use solana_rpc_client::nonblocking::rpc_client::{self, RpcClient};
|
||||
use solana_sdk::pubkey::Pubkey;
|
||||
use std::{
|
||||
|
@ -231,9 +230,7 @@ async fn start_tracking_blocks(
|
|||
if let Some(account) = account_update.account {
|
||||
let bytes: [u8; 32] = account.pubkey.try_into().unwrap_or(Pubkey::default().to_bytes());
|
||||
let pubkey = Pubkey::new_from_array(bytes);
|
||||
let lookup_table = AddressLookupTable::deserialize(&account.data).unwrap();
|
||||
atl_store.map.insert( pubkey, lookup_table.addresses.to_vec());
|
||||
drop(lookup_table);
|
||||
atl_store.save_account(&pubkey, &account.data);
|
||||
}
|
||||
},
|
||||
_ => {}
|
||||
|
|
Loading…
Reference in New Issue