Skip to content

Commit e2071c1

Browse files
committed
fix: ignore product without price on polling
1 parent 756495f commit e2071c1

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "pyth-agent"
3-
version = "2.10.1"
3+
version = "2.10.2"
44
edition = "2021"
55

66
[[bin]]

src/agent/state/oracle.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,13 @@ async fn fetch_batch_of_product_and_price_accounts(
521521
// the product entries
522522
let mut todo = product_entries
523523
.values()
524-
.map(|p| p.account_data.px_acc)
524+
.filter_map(|p| {
525+
if p.account_data.px_acc != Pubkey::default() {
526+
Some(p.account_data.px_acc)
527+
} else {
528+
None
529+
}
530+
})
525531
.collect::<Vec<_>>();
526532

527533
while !todo.is_empty() {

0 commit comments

Comments
 (0)