Skip to content

Commit 446bde0

Browse files
committed
initialize fast market order fixup
1 parent 2907078 commit 446bde0

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

solana/programs/matching-engine/src/fallback/processor/initialize_fast_market_order.rs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ pub(super) fn process(
109109

110110
// Verify that the fast market order account's key is derived correctly.
111111
let new_fast_market_order_info = &accounts[1];
112-
let fast_market_order_key = new_fast_market_order_info.key;
113112
let (expected_fast_market_order_key, fast_market_order_bump) = Pubkey::find_program_address(
114113
&[
115114
FastMarketOrder::SEED_PREFIX,
@@ -119,13 +118,6 @@ pub(super) fn process(
119118
&ID,
120119
);
121120

122-
if fast_market_order_key != &expected_fast_market_order_key {
123-
return Err(MatchingEngineError::InvalidPda.into()).map_err(|e: Error| {
124-
e.with_account_name("fast_market_order")
125-
.with_pubkeys((*fast_market_order_key, expected_fast_market_order_key))
126-
});
127-
}
128-
129121
// These accounts will be used by the Verify VAA shim program.
130122
let wormhole_guardian_set_info = &accounts[2];
131123
let shim_guardian_signatures_info = &accounts[3];
@@ -157,7 +149,7 @@ pub(super) fn process(
157149

158150
super::helpers::create_account_reliably(
159151
payer_info.key,
160-
fast_market_order_key,
152+
&expected_fast_market_order_key,
161153
new_fast_market_order_info.lamports(),
162154
FAST_MARKET_ORDER_DATA_LEN,
163155
accounts,

0 commit comments

Comments
 (0)