Skip to content

Commit

Permalink
geyser: change default commitment to processed (#137)
Browse files Browse the repository at this point in the history
  • Loading branch information
fanatid authored May 29, 2023
1 parent a902665 commit 9e07750
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions 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 @@ -2,7 +2,7 @@
members = [
"examples/rust", # 1.2.0+solana.1.15.2
"yellowstone-grpc-client", # 1.2.0+solana.1.15.2
"yellowstone-grpc-geyser", # 0.7.0+solana.1.15.2
"yellowstone-grpc-geyser", # 0.8.0+solana.1.15.2
"yellowstone-grpc-proto", # 1.2.0+solana.1.15.2
]

Expand Down
2 changes: 1 addition & 1 deletion examples/rust/src/bin/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ impl Args {

#[derive(Debug, Clone, Copy, Default, ValueEnum)]
enum ArgsCommitment {
#[default]
Processed,
Confirmed,
#[default]
Finalized,
}

Expand Down
2 changes: 1 addition & 1 deletion yellowstone-grpc-geyser/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "yellowstone-grpc-geyser"
version = "0.7.0+solana.1.15.2"
version = "0.8.0+solana.1.15.2"
authors = ["Triton One"]
edition = "2021"
description = "Yellowstone gRPC Geyser Plugin"
Expand Down
2 changes: 1 addition & 1 deletion yellowstone-grpc-geyser/src/filters.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ impl Filter {
}

fn decode_commitment(commitment: Option<i32>) -> anyhow::Result<CommitmentLevel> {
let commitment = commitment.unwrap_or(CommitmentLevel::Finalized as i32);
let commitment = commitment.unwrap_or(CommitmentLevel::Processed as i32);
CommitmentLevel::from_i32(commitment)
.ok_or_else(|| anyhow::anyhow!("failed to create CommitmentLevel from {commitment:?}"))
}
Expand Down
2 changes: 1 addition & 1 deletion yellowstone-grpc-geyser/src/grpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ impl BlockMetaStorage {
}

fn parse_commitment(commitment: Option<i32>) -> Result<CommitmentLevel, Status> {
let commitment = commitment.unwrap_or(CommitmentLevel::Finalized as i32);
let commitment = commitment.unwrap_or(CommitmentLevel::Processed as i32);
CommitmentLevel::from_i32(commitment).ok_or_else(|| {
let msg = format!("failed to create CommitmentLevel from {commitment:?}");
Status::unknown(msg)
Expand Down

0 comments on commit 9e07750

Please sign in to comment.