mirror of
https://github.com/0xfnzero/solana-streamer.git
synced 2026-08-04 04:57:44 +00:00
chore: bump version to 1.1.4 and fix subscription filter keys
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solana-streamer-sdk"
|
||||
version = "1.1.3"
|
||||
version = "1.1.4"
|
||||
edition = "2021"
|
||||
authors = ["William <byteblock6@gmail.com>", "sgxiang <sgxiang@gmail.com>", "wei <1415121722@qq.com>"]
|
||||
repository = "https://github.com/0xfnzero/solana-streamer"
|
||||
|
||||
@@ -109,14 +109,14 @@ Add the dependency to your `Cargo.toml`:
|
||||
|
||||
```toml
|
||||
# Add to your Cargo.toml
|
||||
solana-streamer-sdk = { path = "./solana-streamer", version = "1.1.3" }
|
||||
solana-streamer-sdk = { path = "./solana-streamer", version = "1.1.4" }
|
||||
```
|
||||
|
||||
### Use crates.io
|
||||
|
||||
```toml
|
||||
# Add to your Cargo.toml
|
||||
solana-streamer-sdk = "1.1.3"
|
||||
solana-streamer-sdk = "1.1.4"
|
||||
```
|
||||
|
||||
## 🔄 Migration Guide
|
||||
|
||||
+2
-2
@@ -108,14 +108,14 @@ git clone https://github.com/0xfnzero/solana-streamer
|
||||
|
||||
```toml
|
||||
# 添加到您的 Cargo.toml
|
||||
solana-streamer-sdk = { path = "./solana-streamer", version = "1.1.3" }
|
||||
solana-streamer-sdk = { path = "./solana-streamer", version = "1.1.4" }
|
||||
```
|
||||
|
||||
### 使用 crates.io
|
||||
|
||||
```toml
|
||||
# 添加到您的 Cargo.toml
|
||||
solana-streamer-sdk = "1.1.3"
|
||||
solana-streamer-sdk = "1.1.4"
|
||||
```
|
||||
|
||||
## 🔄 迁移指南
|
||||
|
||||
@@ -90,13 +90,13 @@ impl SubscriptionManager {
|
||||
return None;
|
||||
}
|
||||
let mut accounts = HashMap::new();
|
||||
for af in account_filter {
|
||||
for (index, af) in account_filter.iter().enumerate() {
|
||||
accounts.insert(
|
||||
"".to_owned(),
|
||||
format!("account_{}", index),
|
||||
SubscribeRequestFilterAccounts {
|
||||
account: af.account,
|
||||
owner: af.owner,
|
||||
filters: af.filters,
|
||||
account: af.account.clone(),
|
||||
owner: af.owner.clone(),
|
||||
filters: af.filters.clone(),
|
||||
nonempty_txn_signature: None,
|
||||
},
|
||||
);
|
||||
@@ -114,16 +114,16 @@ impl SubscriptionManager {
|
||||
return None;
|
||||
}
|
||||
let mut transactions = HashMap::new();
|
||||
for tf in transaction_filter {
|
||||
for (index, tf) in transaction_filter.iter().enumerate() {
|
||||
transactions.insert(
|
||||
"client".to_string(),
|
||||
format!("transaction_{}", index),
|
||||
SubscribeRequestFilterTransactions {
|
||||
vote: Some(false),
|
||||
failed: Some(false),
|
||||
signature: None,
|
||||
account_include: tf.account_include,
|
||||
account_exclude: tf.account_exclude,
|
||||
account_required: tf.account_required,
|
||||
account_include: tf.account_include.clone(),
|
||||
account_exclude: tf.account_exclude.clone(),
|
||||
account_required: tf.account_required.clone(),
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user