Skip to content

Commit

Permalink
disable pools on mainnet
Browse files Browse the repository at this point in the history
  • Loading branch information
crispheaney committed Nov 27, 2024
1 parent a050502 commit a872761
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions programs/drift/src/instructions/admin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,11 @@ pub fn handle_update_spot_market_pool_id(
ctx: Context<AdminUpdateSpotMarket>,
pool_id: u8,
) -> Result<()> {
#[cfg(all(feature = "mainnet-beta", not(feature = "anchor-test")))]
{
panic!("pools disabled on mainnet-beta");
}

let mut spot_market = load_mut!(ctx.accounts.spot_market)?;
msg!("updating spot market {} pool id to {}", spot_market.market_index, pool_id);

Expand Down
5 changes: 5 additions & 0 deletions programs/drift/src/instructions/user.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2221,6 +2221,11 @@ pub fn handle_update_user_pool_id<'c: 'info, 'info>(
_sub_account_id: u16,
pool_id: u8,
) -> Result<()> {
#[cfg(all(feature = "mainnet-beta", not(feature = "anchor-test")))]
{
panic!("pools disabled on mainnet-beta");
}

let remaining_accounts_iter = &mut ctx.remaining_accounts.iter().peekable();
let AccountMaps {
perp_market_map,
Expand Down

0 comments on commit a872761

Please sign in to comment.