diff --git a/Cargo.toml b/Cargo.toml index 07cb094..f2238bc 100755 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "solana-streamer-sdk" -version = "0.1.6" +version = "0.1.7" 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 6d9be79..ea165a4 100755 --- a/README.md +++ b/README.md @@ -33,14 +33,14 @@ Add the dependency to your `Cargo.toml`: ```toml # Add to your Cargo.toml -solana-streamer-sdk = { path = "./solana-streamer", version = "0.1.6" } +solana-streamer-sdk = { path = "./solana-streamer", version = "0.1.7" } ``` ### Use crates.io ```toml # Add to your Cargo.toml -solana-streamer-sdk = "0.1.6" +solana-streamer-sdk = "0.1.7" ``` ## Usage Examples diff --git a/README_CN.md b/README_CN.md index e3c113b..6d9f91e 100644 --- a/README_CN.md +++ b/README_CN.md @@ -33,14 +33,14 @@ git clone https://github.com/0xfnzero/solana-streamer ```toml # 添加到您的 Cargo.toml -solana-streamer-sdk = { path = "./solana-streamer", version = "0.1.6" } +solana-streamer-sdk = { path = "./solana-streamer", version = "0.1.7" } ``` ### 使用 crates.io ```toml # 添加到您的 Cargo.toml -solana-streamer-sdk = "0.1.6" +solana-streamer-sdk = "0.1.7" ``` ## 使用示例 diff --git a/src/streaming/event_parser/core/traits.rs b/src/streaming/event_parser/core/traits.rs index 26a234d..044ecb3 100755 --- a/src/streaming/event_parser/core/traits.rs +++ b/src/streaming/event_parser/core/traits.rs @@ -326,8 +326,18 @@ pub trait EventParser: Send + Sync { let i_index_parent_index = i_index.split(".").nth(0).unwrap(); let in_index_parent_index = in_index.split(".").nth(0).unwrap(); if i_index_parent_index == in_index_parent_index { - let i_index_child_index = i_index.split(".").nth(1).unwrap(); - let in_index_child_index = in_index.split(".").nth(1).unwrap(); + let i_index_child_index = i_index + .split(".") + .nth(1) + .unwrap() + .parse::() + .unwrap_or(0); + let in_index_child_index = in_index + .split(".") + .nth(1) + .unwrap() + .parse::() + .unwrap_or(0); if in_index_child_index > i_index_child_index { instruction_event.merge(inner_instruction_event.clone_boxed()); break;