File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed
solana/programs/matching-engine/src/fallback/processor Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -119,6 +119,16 @@ pub(super) fn process(
119
119
// fast market order account.
120
120
let payer_info = & accounts[ 0 ] ;
121
121
122
+ // These accounts will be used by the Verify VAA shim program.
123
+ let from_endpoint = super :: helpers:: try_live_endpoint_account ( & accounts[ 1 ] , "from_endpoint" )
124
+ . map_err ( |e : Error | e. with_account_name ( "from_endpoint" ) ) ?;
125
+
126
+ if fast_market_order. vaa_emitter_address != from_endpoint. address
127
+ || fast_market_order. vaa_emitter_chain != from_endpoint. chain
128
+ {
129
+ return Err ( MatchingEngineError :: InvalidEndpoint . into ( ) ) ;
130
+ }
131
+
122
132
// Verify the VAA digest with the Verify VAA shim program.
123
133
super :: helpers:: invoke_verify_hash (
124
134
2 , // verify_vaa_shim_program_index
@@ -129,16 +139,6 @@ pub(super) fn process(
129
139
accounts,
130
140
) ?;
131
141
132
- // These accounts will be used by the Verify VAA shim program.
133
- let from_endpoint = super :: helpers:: try_live_endpoint_account ( & accounts[ 2 ] , "from_endpoint" )
134
- . map_err ( |e : Error | e. with_account_name ( "from_endpoint" ) ) ?;
135
-
136
- if fast_market_order. vaa_emitter_address != from_endpoint. address
137
- || fast_market_order. vaa_emitter_chain != from_endpoint. chain
138
- {
139
- return Err ( MatchingEngineError :: InvalidEndpoint . into ( ) ) ;
140
- }
141
-
142
142
// Create the new fast market order account and serialize the instruction
143
143
// data into it.
144
144
You can’t perform that action at this time.
0 commit comments