feat: upgrade to v1.2.3

This commit is contained in:
ysq
2025-09-27 11:32:32 +08:00
parent 2c52306a79
commit e75b0c9480
4 changed files with 10 additions and 8 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "sol-trade-sdk"
version = "1.2.2"
version = "1.2.3"
edition = "2021"
authors = [
"William <byteblock6@gmail.com>",
+2 -2
View File
@@ -87,14 +87,14 @@ Add the dependency to your `Cargo.toml`:
```toml
# Add to your Cargo.toml
sol-trade-sdk = { path = "./sol-trade-sdk", version = "1.2.2" }
sol-trade-sdk = { path = "./sol-trade-sdk", version = "1.2.3" }
```
### Use crates.io
```toml
# Add to your Cargo.toml
sol-trade-sdk = "1.2.2"
sol-trade-sdk = "1.2.3"
```
## 🛠️ Usage Examples
+2 -2
View File
@@ -87,14 +87,14 @@ git clone https://github.com/0xfnzero/sol-trade-sdk
```toml
# 添加到您的 Cargo.toml
sol-trade-sdk = { path = "./sol-trade-sdk", version = "1.2.2" }
sol-trade-sdk = { path = "./sol-trade-sdk", version = "1.2.3" }
```
### 使用 crates.io
```toml
# 添加到您的 Cargo.toml
sol-trade-sdk = "1.2.2"
sol-trade-sdk = "1.2.3"
```
## 🛠️ 使用示例
+5 -3
View File
@@ -88,7 +88,7 @@ async fn parallel_execute(
return Err(anyhow!("No Rpc Default Swqos configured."));
}
let cores = core_affinity::get_core_ids().unwrap();
let mut handles: Vec<JoinHandle<Result<(bool, Signature, anyhow::Error)>>> =
let mut handles: Vec<JoinHandle<Result<(bool, Signature, Option<anyhow::Error>)>>> =
Vec::with_capacity(swqos_clients.len());
let instructions = Arc::new(instructions);
@@ -194,7 +194,7 @@ async fn parallel_execute(
);
if let Some(signature) = transaction.signatures.first() {
return Ok((success, signature.clone(), err.unwrap()));
return Ok((success, signature.clone(), err));
} else {
return Err(anyhow!("Transaction has no signatures"));
}
@@ -237,7 +237,9 @@ async fn parallel_execute(
if success {
return Ok((success, sig));
}
errors.push(format!("Task error: {}", err));
if let Some(err) = err {
errors.push(format!("Task error: {}", err));
}
last_signature = Some(sig);
}
Ok(Err(e)) => errors.push(format!("Task error: {}", e)),