program: fix health check ix (#918)
This commit is contained in:
parent
6f85dfa42d
commit
769f940a66
|
@ -4,8 +4,7 @@ use fixed::types::I80F48;
|
|||
use crate::accounts_ix::*;
|
||||
use crate::error::{Contextable, MangoError};
|
||||
use crate::health::{
|
||||
new_fixed_order_account_retriever_with_optional_banks,
|
||||
new_health_cache_skipping_missing_banks_and_bad_oracles, HealthType,
|
||||
new_health_cache_skipping_missing_banks_and_bad_oracles, HealthType, ScanningAccountRetriever,
|
||||
};
|
||||
use crate::state::*;
|
||||
use crate::util::clock_now;
|
||||
|
@ -18,11 +17,11 @@ pub fn health_check(
|
|||
let account = ctx.accounts.account.load_full_mut()?;
|
||||
let (now_ts, now_slot) = clock_now();
|
||||
|
||||
let retriever = new_fixed_order_account_retriever_with_optional_banks(
|
||||
ctx.remaining_accounts,
|
||||
&account.borrow(),
|
||||
now_slot,
|
||||
)?;
|
||||
let group_pk = &ctx.accounts.group.key();
|
||||
|
||||
let retriever = ScanningAccountRetriever::new(ctx.remaining_accounts, group_pk)
|
||||
.context("create account retriever")?;
|
||||
|
||||
let health_cache = new_health_cache_skipping_missing_banks_and_bad_oracles(
|
||||
&account.borrow(),
|
||||
&retriever,
|
||||
|
|
Loading…
Reference in New Issue