Skip to content

Commit 7b2f576

Browse files
committed
solana: add missing constraint
1 parent 18d7a34 commit 7b2f576

File tree

1 file changed

+14
-0
lines changed
  • solana/programs/matching-engine/src/composite

1 file changed

+14
-0
lines changed

solana/programs/matching-engine/src/composite/mod.rs

+14
Original file line numberDiff line numberDiff line change
@@ -567,6 +567,20 @@ pub struct ReserveFastFillSequence<'info> {
567567
#[account(mut)]
568568
pub payer: Signer<'info>,
569569

570+
#[account(
571+
constraint = {
572+
// Destination endpoint must be for Solana.
573+
require!(
574+
matches!(
575+
fast_order_path.to_endpoint.protocol,
576+
MessageProtocol::Local { .. }
577+
),
578+
MatchingEngineError::InvalidTargetRouter
579+
);
580+
581+
true
582+
},
583+
)]
570584
pub fast_order_path: FastOrderPath<'info>,
571585

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

0 commit comments

Comments
 (0)