geyser: change default commitment to processed (#137)
This commit is contained in:
parent
a902665c00
commit
9e0775068d
|
@ -149,9 +149,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "anyhow"
|
||||
version = "1.0.62"
|
||||
version = "1.0.71"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1485d4d2cc45e7b201ee3767015c96faa5904387c9d87c6efdd0fb511f12d305"
|
||||
checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8"
|
||||
|
||||
[[package]]
|
||||
name = "ark-bn254"
|
||||
|
@ -4290,7 +4290,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "yellowstone-grpc-geyser"
|
||||
version = "0.7.0+solana.1.15.2"
|
||||
version = "0.8.0+solana.1.15.2"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"base64 0.21.0",
|
||||
|
|
|
@ -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
|
||||
]
|
||||
|
||||
|
|
|
@ -52,9 +52,9 @@ impl Args {
|
|||
|
||||
#[derive(Debug, Clone, Copy, Default, ValueEnum)]
|
||||
enum ArgsCommitment {
|
||||
#[default]
|
||||
Processed,
|
||||
Confirmed,
|
||||
#[default]
|
||||
Finalized,
|
||||
}
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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:?}"))
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue