From 042f7dcaad64d7075e7ca8826d24152199edd1d9 Mon Sep 17 00:00:00 2001 From: home <923092666@qq.com> Date: Thu, 20 Nov 2025 21:21:28 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E4=BC=98=E5=8C=96=E5=88=A4=E6=96=AD?= =?UTF-8?q?=E4=B9=B0=E5=8D=96=E6=96=B9=E5=90=91=EF=BC=9B=E7=9B=B4=E6=8E=A5?= =?UTF-8?q?=E7=94=A8SwapParams=E9=87=8C=E7=9A=84=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/trading/core/executor.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/trading/core/executor.rs b/src/trading/core/executor.rs index 1166d0b..eef6f6f 100755 --- a/src/trading/core/executor.rs +++ b/src/trading/core/executor.rs @@ -17,7 +17,7 @@ use crate::{ trading::MiddlewareManager, }; use once_cell::sync::Lazy; - +use crate::swqos::TradeType; use super::{params::SwapParams, traits::InstructionBuilder}; /// 🚀 全局系统调用绕过管理器 @@ -48,9 +48,7 @@ impl TradeExecutor for GenericTradeExecutor { let total_start = Instant::now(); // 判断买卖方向 - let is_buy = ExecutionPath::is_buy(¶ms.input_mint) - || (params.input_mint == crate::constants::USD1_TOKEN_ACCOUNT - && params.output_mint != crate::constants::WSOL_TOKEN_ACCOUNT); + let is_buy = params.trade_type == TradeType::Buy || params.trade_type == TradeType::CreateAndBuy; // CPU 预取 Prefetch::keypair(¶ms.payer);