Skip to content

Commit

Permalink
rename prune -> purge
Browse files Browse the repository at this point in the history
  • Loading branch information
mschneider committed Nov 21, 2024
1 parent 243e51a commit 8ee331a
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions programs/mango-v4/src/accounts_ix/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::*;
Expand Down Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>,

Expand Down
4 changes: 2 additions & 2 deletions programs/mango-v4/src/instructions/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::*;
Expand Down Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use crate::accounts_ix::*;
use crate::error::MangoError;
use crate::state::*;

pub fn perp_prune_orders(ctx: Context<PerpPruneOrders>, limit: u8) -> Result<()> {
pub fn perp_purge_orders(ctx: Context<PerpPurgeOrders>, 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);
Expand Down
4 changes: 2 additions & 2 deletions programs/mango-v4/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1326,9 +1326,9 @@ pub mod mango_v4 {
Ok(())
}

pub fn perp_prune_orders(ctx: Context<PerpPruneOrders>, limit: u8) -> Result<()> {
pub fn perp_purge_orders(ctx: Context<PerpPurgeOrders>, limit: u8) -> Result<()> {
#[cfg(feature = "enable-gpl")]
instructions::perp_prune_orders(ctx, limit)?;
instructions::perp_purge_orders(ctx, limit)?;
Ok(())
}

Expand Down

0 comments on commit 8ee331a

Please sign in to comment.