Skip to content

Commit

Permalink
solana: add missing constraint
Browse files Browse the repository at this point in the history
  • Loading branch information
a5-pickle committed Sep 30, 2024
1 parent ddded3b commit d81c680
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions solana/programs/matching-engine/src/composite/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,20 @@ pub struct ReserveFastFillSequence<'info> {
#[account(mut)]
pub payer: Signer<'info>,

#[account(
constraint = {
// Destination endpoint must be for Solana.
require!(
matches!(
fast_order_path.to_endpoint.protocol,
MessageProtocol::Local { .. }
),
MatchingEngineError::InvalidTargetRouter
);
true
},
)]
pub fast_order_path: FastOrderPath<'info>,

/// This sequencer determines the next reserved sequence. If it does not exist for a given
Expand Down

0 comments on commit d81c680

Please sign in to comment.