feat: upgrade to v1.2.3
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "sol-trade-sdk"
|
||||
version = "1.2.2"
|
||||
version = "1.2.3"
|
||||
edition = "2021"
|
||||
authors = [
|
||||
"William <byteblock6@gmail.com>",
|
||||
|
||||
@@ -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
@@ -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"
|
||||
```
|
||||
|
||||
## 🛠️ 使用示例
|
||||
|
||||
@@ -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)),
|
||||
|
||||
Reference in New Issue
Block a user