diff --git a/CHANGELOG.md b/CHANGELOG.md index 2cca63e4..ebf16df3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,14 @@ The minor version will be incremented upon a breaking change and the patch versi ### Breaking +## 2023-12-08 + +- yellowstone-grpc-tools-1.0.0-rc.9+solana.1.16.21 + +### Fixes + +- tools: fix panic on Ping/Pong messages in google pubsub ([#261](https://github.com/rpcpool/yellowstone-grpc/pull/261)) + ## 2023-12-06 - yellowstone-grpc-tools-1.0.0-rc.8+solana.1.16.21 diff --git a/Cargo.lock b/Cargo.lock index 6d6cb505..ef15723a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5033,7 +5033,7 @@ dependencies = [ [[package]] name = "yellowstone-grpc-tools" -version = "1.0.0-rc.8+solana.1.16.21" +version = "1.0.0-rc.9+solana.1.16.21" dependencies = [ "anyhow", "async-trait", diff --git a/Cargo.toml b/Cargo.toml index 6dac1ad6..5a794bc2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,7 +5,7 @@ members = [ "yellowstone-grpc-client", # 1.12.0+solana.1.16.21 "yellowstone-grpc-geyser", # 1.11.1+solana.1.16.21 "yellowstone-grpc-proto", # 1.11.0+solana.1.16.21 - "yellowstone-grpc-tools", # 1.0.0-rc.8+solana.1.16.21 + "yellowstone-grpc-tools", # 1.0.0-rc.9+solana.1.16.21 ] [workspace.package] diff --git a/yellowstone-grpc-tools/Cargo.toml b/yellowstone-grpc-tools/Cargo.toml index 77941c92..b6fa211b 100644 --- a/yellowstone-grpc-tools/Cargo.toml +++ b/yellowstone-grpc-tools/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "yellowstone-grpc-tools" -version = "1.0.0-rc.8+solana.1.16.21" +version = "1.0.0-rc.9+solana.1.16.21" authors = { workspace = true } edition = { workspace = true } description = "Yellowstone gRPC Tools" diff --git a/yellowstone-grpc-tools/src/bin/grpc-google-pubsub.rs b/yellowstone-grpc-tools/src/bin/grpc-google-pubsub.rs index 20e345a6..f719549b 100644 --- a/yellowstone-grpc-tools/src/bin/grpc-google-pubsub.rs +++ b/yellowstone-grpc-tools/src/bin/grpc-google-pubsub.rs @@ -147,17 +147,17 @@ impl ArgsAction { None => break 'outer, }; - let payload = message.encode_to_vec(); - let message = match &message.update_oneof { - Some(value) => value, + match &message.update_oneof { + Some(UpdateOneof::Ping(_)) => continue, + Some(UpdateOneof::Pong(_)) => continue, + Some(value) => prom_kind.push(GprcMessageKind::from(value)), None => unreachable!("Expect valid message"), }; messages.push(PubsubMessage { - data: payload, + data: message.encode_to_vec(), ..Default::default() }); - prom_kind.push(GprcMessageKind::from(message)); } if messages.is_empty() { continue;