From 8ee331aad4d90efbb146213308633188595adf6d Mon Sep 17 00:00:00 2001 From: Maximilian Schneider Date: Thu, 21 Nov 2024 18:19:51 +0000 Subject: [PATCH] rename prune -> purge --- programs/mango-v4/src/accounts_ix/mod.rs | 4 ++-- .../{perp_prune_orders.rs => perp_purge_orders.rs} | 2 +- programs/mango-v4/src/instructions/mod.rs | 4 ++-- .../{perp_prune_orders.rs => perp_purge_orders.rs} | 2 +- programs/mango-v4/src/lib.rs | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) rename programs/mango-v4/src/accounts_ix/{perp_prune_orders.rs => perp_purge_orders.rs} (94%) rename programs/mango-v4/src/instructions/{perp_prune_orders.rs => perp_purge_orders.rs} (91%) diff --git a/programs/mango-v4/src/accounts_ix/mod.rs b/programs/mango-v4/src/accounts_ix/mod.rs index f4b2d6f28..1cd1b2a4e 100644 --- a/programs/mango-v4/src/accounts_ix/mod.rs +++ b/programs/mango-v4/src/accounts_ix/mod.rs @@ -44,7 +44,7 @@ pub use perp_liq_base_or_positive_pnl::*; pub use perp_liq_force_cancel_orders::*; pub use perp_liq_negative_pnl_or_bankruptcy::*; pub use perp_place_order::*; -pub use perp_prune_orders::*; +pub use perp_purge_orders::*; pub use perp_purge_position::*; pub use perp_settle_fees::*; pub use perp_settle_pnl::*; @@ -127,7 +127,7 @@ mod perp_liq_base_or_positive_pnl; mod perp_liq_force_cancel_orders; mod perp_liq_negative_pnl_or_bankruptcy; mod perp_place_order; -mod perp_prune_orders; +mod perp_purge_orders; mod perp_purge_position; mod perp_settle_fees; mod perp_settle_pnl; diff --git a/programs/mango-v4/src/accounts_ix/perp_prune_orders.rs b/programs/mango-v4/src/accounts_ix/perp_purge_orders.rs similarity index 94% rename from programs/mango-v4/src/accounts_ix/perp_prune_orders.rs rename to programs/mango-v4/src/accounts_ix/perp_purge_orders.rs index 249827567..0248848e7 100644 --- a/programs/mango-v4/src/accounts_ix/perp_prune_orders.rs +++ b/programs/mango-v4/src/accounts_ix/perp_purge_orders.rs @@ -2,7 +2,7 @@ use crate::state::{BookSide, Group, MangoAccountFixed, PerpMarket}; use anchor_lang::prelude::*; #[derive(Accounts)] -pub struct PerpPruneOrders<'info> { +pub struct PerpPurgeOrders<'info> { #[account()] pub group: AccountLoader<'info, Group>, diff --git a/programs/mango-v4/src/instructions/mod.rs b/programs/mango-v4/src/instructions/mod.rs index 18d4f04bc..0ecc0225f 100644 --- a/programs/mango-v4/src/instructions/mod.rs +++ b/programs/mango-v4/src/instructions/mod.rs @@ -34,7 +34,7 @@ pub use perp_liq_base_or_positive_pnl::*; pub use perp_liq_force_cancel_orders::*; pub use perp_liq_negative_pnl_or_bankruptcy::*; pub use perp_place_order::*; -pub use perp_prune_orders::*; +pub use perp_purge_orders::*; pub use perp_purge_position::*; pub use perp_settle_fees::*; pub use perp_settle_pnl::*; @@ -108,7 +108,7 @@ mod perp_liq_base_or_positive_pnl; mod perp_liq_force_cancel_orders; mod perp_liq_negative_pnl_or_bankruptcy; mod perp_place_order; -mod perp_prune_orders; +mod perp_purge_orders; mod perp_purge_position; mod perp_settle_fees; mod perp_settle_pnl; diff --git a/programs/mango-v4/src/instructions/perp_prune_orders.rs b/programs/mango-v4/src/instructions/perp_purge_orders.rs similarity index 91% rename from programs/mango-v4/src/instructions/perp_prune_orders.rs rename to programs/mango-v4/src/instructions/perp_purge_orders.rs index 6219eb105..11d1d8cbf 100644 --- a/programs/mango-v4/src/instructions/perp_prune_orders.rs +++ b/programs/mango-v4/src/instructions/perp_purge_orders.rs @@ -4,7 +4,7 @@ use crate::accounts_ix::*; use crate::error::MangoError; use crate::state::*; -pub fn perp_prune_orders(ctx: Context, limit: u8) -> Result<()> { +pub fn perp_purge_orders(ctx: Context, limit: u8) -> Result<()> { let mut perp_market = ctx.accounts.perp_market.load_mut()?; // only allow pruning orders when market is in force-close require!(perp_market.is_force_close(), MangoError::SomeError); diff --git a/programs/mango-v4/src/lib.rs b/programs/mango-v4/src/lib.rs index 930dae84a..8a4f7bffc 100644 --- a/programs/mango-v4/src/lib.rs +++ b/programs/mango-v4/src/lib.rs @@ -1326,9 +1326,9 @@ pub mod mango_v4 { Ok(()) } - pub fn perp_prune_orders(ctx: Context, limit: u8) -> Result<()> { + pub fn perp_purge_orders(ctx: Context, limit: u8) -> Result<()> { #[cfg(feature = "enable-gpl")] - instructions::perp_prune_orders(ctx, limit)?; + instructions::perp_purge_orders(ctx, limit)?; Ok(()) }