From 2ba05f2b68e8f2b69b3eb1c2275eb6e5383fd048 Mon Sep 17 00:00:00 2001 From: Jon Gurary Date: Wed, 28 Aug 2024 15:06:10 -0400 Subject: [PATCH] Attempt fix fuzz --- clients/rust/marginfi-cli/src/entrypoint.rs | 1 + programs/marginfi/fuzz/src/account_state.rs | 4 ++-- programs/marginfi/fuzz/src/lib.rs | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/clients/rust/marginfi-cli/src/entrypoint.rs b/clients/rust/marginfi-cli/src/entrypoint.rs index 052fea9a..1416929b 100644 --- a/clients/rust/marginfi-cli/src/entrypoint.rs +++ b/clients/rust/marginfi-cli/src/entrypoint.rs @@ -85,6 +85,7 @@ pub enum Command { }, } +#[allow(clippy::large_enum_variant)] #[derive(Debug, Parser)] pub enum GroupCommand { Get { diff --git a/programs/marginfi/fuzz/src/account_state.rs b/programs/marginfi/fuzz/src/account_state.rs index 5a861ec0..b0a05468 100644 --- a/programs/marginfi/fuzz/src/account_state.rs +++ b/programs/marginfi/fuzz/src/account_state.rs @@ -72,8 +72,8 @@ impl AccountsState { self.bump.alloc(fee_state_key), false, true, - self.bump.alloc(0), - &mut [], + self.bump.alloc(9999999), + self.allocate_dex_owned_account(256 +8), self.bump.alloc(program_id), false, Epoch::default(), diff --git a/programs/marginfi/fuzz/src/lib.rs b/programs/marginfi/fuzz/src/lib.rs index 9c4004e6..4ac9918e 100644 --- a/programs/marginfi/fuzz/src/lib.rs +++ b/programs/marginfi/fuzz/src/lib.rs @@ -205,7 +205,7 @@ impl<'state> MarginfiFuzzContext<'state> { fee_vault_authority.key, bank.key, ); - let (fee_state_key, fee_state_bump) = + let (_fee_state_key, fee_state_bump) = Pubkey::find_program_address(&[FEE_STATE_SEED.as_bytes()], &marginfi::id()); let oracle = state.new_oracle_account(