Properly loading the ALTs

This commit is contained in:
godmodegalactus 2024-01-23 12:04:52 +01:00
parent 64d607155c
commit da7cc321a1
No known key found for this signature in database
GPG Key ID: 22DA4A30887FDA3C
3 changed files with 3 additions and 1 deletions

1
Cargo.lock generated
View File

@ -1476,6 +1476,7 @@ dependencies = [
"rustls 0.20.8",
"serde",
"serde_json",
"solana-account-decoder",
"solana-address-lookup-table-program 1.16.17 (registry+https://github.com/rust-lang/crates.io-index)",
"solana-rpc-client",
"solana-rpc-client-api",

View File

@ -10,6 +10,7 @@ solana-rpc-client = "~1.16.17"
solana-rpc-client-api = "~1.16.17"
solana-transaction-status = "~1.16.17"
solana-address-lookup-table-program = "~1.16.17"
solana-account-decoder = "~1.16.17"
itertools = "0.10.5"
serde = { version = "1.0.160", features = ["derive"] }

View File

@ -32,7 +32,7 @@ impl ALTStore {
pub async fn load_all_alts(&self, alts_list: Vec<Pubkey>) {
let alts_list = alts_list
.iter()
.filter(|x| self.map.contains_key(&x) || self.is_loading.contains_key(&x))
.filter(|x| !self.map.contains_key(&x) && !self.is_loading.contains_key(&x))
.cloned()
.collect_vec();