From 329405e23fecc6ace839ef71237cd91b4aa2b245 Mon Sep 17 00:00:00 2001 From: ysq Date: Sun, 16 Nov 2025 23:30:51 +0800 Subject: [PATCH] chore: bump version to 1.1.4 and fix subscription filter keys --- Cargo.toml | 2 +- README.md | 4 ++-- README_CN.md | 4 ++-- src/streaming/grpc/subscription.rs | 20 ++++++++++---------- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 847a40c..8c31244 100755 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "solana-streamer-sdk" -version = "1.1.3" +version = "1.1.4" edition = "2021" authors = ["William ", "sgxiang ", "wei <1415121722@qq.com>"] repository = "https://github.com/0xfnzero/solana-streamer" diff --git a/README.md b/README.md index e9714ab..6f49a9f 100755 --- a/README.md +++ b/README.md @@ -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 diff --git a/README_CN.md b/README_CN.md index 1d96957..4d04a67 100644 --- a/README_CN.md +++ b/README_CN.md @@ -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" ``` ## πŸ”„ θΏη§»ζŒ‡ε— diff --git a/src/streaming/grpc/subscription.rs b/src/streaming/grpc/subscription.rs index 9c50340..114f5cb 100644 --- a/src/streaming/grpc/subscription.rs +++ b/src/streaming/grpc/subscription.rs @@ -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(), }, ); }