Skip to content

Commit

Permalink
fix: ignore product without price on polling
Browse files Browse the repository at this point in the history
  • Loading branch information
ali-bahjati committed Jul 24, 2024
1 parent 756495f commit e2071c1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pyth-agent"
version = "2.10.1"
version = "2.10.2"
edition = "2021"

[[bin]]
Expand Down
8 changes: 7 additions & 1 deletion src/agent/state/oracle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,13 @@ async fn fetch_batch_of_product_and_price_accounts(
// the product entries
let mut todo = product_entries
.values()
.map(|p| p.account_data.px_acc)
.filter_map(|p| {
if p.account_data.px_acc != Pubkey::default() {
Some(p.account_data.px_acc)
} else {
None
}
})
.collect::<Vec<_>>();

while !todo.is_empty() {
Expand Down

0 comments on commit e2071c1

Please sign in to comment.