diff --git a/solana/programs/matching-engine/src/composite/mod.rs b/solana/programs/matching-engine/src/composite/mod.rs index 9a62b0f0..a57fbfc4 100644 --- a/solana/programs/matching-engine/src/composite/mod.rs +++ b/solana/programs/matching-engine/src/composite/mod.rs @@ -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