Skip to content

Commit

Permalink
geyser: fix getLatestBlockhash unary method
Browse files Browse the repository at this point in the history
  • Loading branch information
fanatid committed May 27, 2024
1 parent 22d5c28 commit 467337f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ The minor version will be incremented upon a breaking change and the patch versi

### Fixes

- geyser: fix getLatestBlockhash unary method ([#349](https://github.com/rpcpool/yellowstone-grpc/pull/349))

### Features

### Breaking
Expand Down
11 changes: 6 additions & 5 deletions yellowstone-grpc-geyser/src/grpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1385,13 +1385,14 @@ impl Geyser for GrpcService {
blocks_meta
.get_block(
|block| {
block.block_height.map(|last_valid_block_height| {
GetLatestBlockhashResponse {
block
.block_height
.map(|block_height| GetLatestBlockhashResponse {
slot: block.slot,
blockhash: block.blockhash.clone(),
last_valid_block_height,
}
})
last_valid_block_height: block_height
+ MAX_RECENT_BLOCKHASHES as u64,
})
},
request.get_ref().commitment,
)
Expand Down

0 comments on commit 467337f

Please sign in to comment.