Skip to content

Commit

Permalink
v1.16: tools: fix panic on Ping/Pong messages in google pubsub (backp…
Browse files Browse the repository at this point in the history
…ort of #261) (#262)
  • Loading branch information
fanatid committed Dec 8, 2023
1 parent 17cd04e commit 4783b60
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 8 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion yellowstone-grpc-tools/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
10 changes: 5 additions & 5 deletions yellowstone-grpc-tools/src/bin/grpc-google-pubsub.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 4783b60

Please sign in to comment.