liquidator: track fallback oracles (#931)

This commit is contained in:
Christian Kamm 2024-04-04 11:23:58 +02:00 committed by GitHub
parent fbea22612e
commit fa32449feb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 8 additions and 1 deletions

View File

@ -110,9 +110,16 @@ async fn main() -> anyhow::Result<()> {
let mango_oracles = group_context
.tokens
.values()
.map(|value| value.oracle)
.flat_map(|value| {
[
value.oracle,
value.fallback_context.key,
value.fallback_context.quote_key,
]
})
.chain(group_context.perp_markets.values().map(|p| p.oracle))
.unique()
.filter(|&k| k != Pubkey::default())
.collect::<Vec<Pubkey>>();
let serum_programs = group_context