chore: bump version to 1.1.4 and fix subscription filter keys

This commit is contained in:
ysq
2025-11-16 23:30:51 +08:00
parent 4b019e5e01
commit 329405e23f
4 changed files with 15 additions and 15 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
[package] [package]
name = "solana-streamer-sdk" name = "solana-streamer-sdk"
version = "1.1.3" version = "1.1.4"
edition = "2021" edition = "2021"
authors = ["William <byteblock6@gmail.com>", "sgxiang <sgxiang@gmail.com>", "wei <1415121722@qq.com>"] authors = ["William <byteblock6@gmail.com>", "sgxiang <sgxiang@gmail.com>", "wei <1415121722@qq.com>"]
repository = "https://github.com/0xfnzero/solana-streamer" repository = "https://github.com/0xfnzero/solana-streamer"
+2 -2
View File
@@ -109,14 +109,14 @@ Add the dependency to your `Cargo.toml`:
```toml ```toml
# Add to your Cargo.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 ### Use crates.io
```toml ```toml
# Add to your Cargo.toml # Add to your Cargo.toml
solana-streamer-sdk = "1.1.3" solana-streamer-sdk = "1.1.4"
``` ```
## 🔄 Migration Guide ## 🔄 Migration Guide
+2 -2
View File
@@ -108,14 +108,14 @@ git clone https://github.com/0xfnzero/solana-streamer
```toml ```toml
# 添加到您的 Cargo.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 ### 使用 crates.io
```toml ```toml
# 添加到您的 Cargo.toml # 添加到您的 Cargo.toml
solana-streamer-sdk = "1.1.3" solana-streamer-sdk = "1.1.4"
``` ```
## 🔄 迁移指南 ## 🔄 迁移指南
+10 -10
View File
@@ -90,13 +90,13 @@ impl SubscriptionManager {
return None; return None;
} }
let mut accounts = HashMap::new(); let mut accounts = HashMap::new();
for af in account_filter { for (index, af) in account_filter.iter().enumerate() {
accounts.insert( accounts.insert(
"".to_owned(), format!("account_{}", index),
SubscribeRequestFilterAccounts { SubscribeRequestFilterAccounts {
account: af.account, account: af.account.clone(),
owner: af.owner, owner: af.owner.clone(),
filters: af.filters, filters: af.filters.clone(),
nonempty_txn_signature: None, nonempty_txn_signature: None,
}, },
); );
@@ -114,16 +114,16 @@ impl SubscriptionManager {
return None; return None;
} }
let mut transactions = HashMap::new(); let mut transactions = HashMap::new();
for tf in transaction_filter { for (index, tf) in transaction_filter.iter().enumerate() {
transactions.insert( transactions.insert(
"client".to_string(), format!("transaction_{}", index),
SubscribeRequestFilterTransactions { SubscribeRequestFilterTransactions {
vote: Some(false), vote: Some(false),
failed: Some(false), failed: Some(false),
signature: None, signature: None,
account_include: tf.account_include, account_include: tf.account_include.clone(),
account_exclude: tf.account_exclude, account_exclude: tf.account_exclude.clone(),
account_required: tf.account_required, account_required: tf.account_required.clone(),
}, },
); );
} }