Merge commit 'd0ae515af1c57db680794d65456d997844180a58'
This commit is contained in:
@@ -17,7 +17,7 @@ use crate::{
|
|||||||
trading::MiddlewareManager,
|
trading::MiddlewareManager,
|
||||||
};
|
};
|
||||||
use once_cell::sync::Lazy;
|
use once_cell::sync::Lazy;
|
||||||
|
use crate::swqos::TradeType;
|
||||||
use super::{params::SwapParams, traits::InstructionBuilder};
|
use super::{params::SwapParams, traits::InstructionBuilder};
|
||||||
|
|
||||||
/// 🚀 全局系统调用绕过管理器
|
/// 🚀 全局系统调用绕过管理器
|
||||||
@@ -48,9 +48,7 @@ impl TradeExecutor for GenericTradeExecutor {
|
|||||||
let total_start = Instant::now();
|
let total_start = Instant::now();
|
||||||
|
|
||||||
// 判断买卖方向
|
// 判断买卖方向
|
||||||
let is_buy = ExecutionPath::is_buy(¶ms.input_mint)
|
let is_buy = params.trade_type == TradeType::Buy || params.trade_type == TradeType::CreateAndBuy;
|
||||||
|| (params.input_mint == crate::constants::USD1_TOKEN_ACCOUNT
|
|
||||||
&& params.output_mint != crate::constants::WSOL_TOKEN_ACCOUNT);
|
|
||||||
|
|
||||||
// CPU 预取
|
// CPU 预取
|
||||||
Prefetch::keypair(¶ms.payer);
|
Prefetch::keypair(¶ms.payer);
|
||||||
|
|||||||
Reference in New Issue
Block a user