cargo fmt and clippy
This commit is contained in:
parent
2002c43589
commit
80288a4ade
|
@ -95,8 +95,9 @@ impl AccountDataByCommitment {
|
|||
// processed not present for the slot
|
||||
// grpc can send multiple inter transaction changed account states for same slot
|
||||
// we have to update till we get the last
|
||||
if commitment == Commitment::Processed || !self.processed_accounts.contains_key(&data.updated_slot){
|
||||
|
||||
if commitment == Commitment::Processed
|
||||
|| !self.processed_accounts.contains_key(&data.updated_slot)
|
||||
{
|
||||
self.processed_accounts
|
||||
.insert(data.updated_slot, data.clone());
|
||||
updated = true;
|
||||
|
@ -413,7 +414,11 @@ impl AccountStorageInterface for InmemoryAccountStore {
|
|||
}
|
||||
None => {
|
||||
if commitment == Commitment::Confirmed {
|
||||
log::warn!("slot status not found for {} and commitment {}, confirmed lagging", slot, commitment.into_commitment_level());
|
||||
log::warn!(
|
||||
"slot status not found for {} and commitment {}, confirmed lagging",
|
||||
slot,
|
||||
commitment.into_commitment_level()
|
||||
);
|
||||
} else if commitment == Commitment::Finalized {
|
||||
log::error!("slot status not found for {} and commitment {}, should be normal during startup", slot, commitment.into_commitment_level());
|
||||
}
|
||||
|
|
|
@ -1,12 +1,18 @@
|
|||
use std::time::Duration;
|
||||
|
||||
use bytes::Bytes;
|
||||
use geyser_grpc_connector::{yellowstone_grpc_util::GeyserGrpcClientBufferConfig, GeyserGrpcClient, GeyserGrpcClientResult};
|
||||
use tonic::{codec::CompressionEncoding, metadata::{errors::InvalidMetadataValue, AsciiMetadataValue}, service::Interceptor, transport::ClientTlsConfig};
|
||||
use geyser_grpc_connector::{
|
||||
yellowstone_grpc_util::GeyserGrpcClientBufferConfig, GeyserGrpcClient, GeyserGrpcClientResult,
|
||||
};
|
||||
use tonic::{
|
||||
codec::CompressionEncoding,
|
||||
metadata::{errors::InvalidMetadataValue, AsciiMetadataValue},
|
||||
service::Interceptor,
|
||||
transport::ClientTlsConfig,
|
||||
};
|
||||
use tonic_health::pb::health_client::HealthClient;
|
||||
use yellowstone_grpc_proto::geyser::geyser_client::GeyserClient;
|
||||
use yellowstone_grpc_client::InterceptorXToken;
|
||||
|
||||
use yellowstone_grpc_proto::geyser::geyser_client::GeyserClient;
|
||||
|
||||
pub async fn connect_with_timeout_with_buffers_and_compression<E, T>(
|
||||
endpoint: E,
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
pub mod grpc_accounts_streaming;
|
||||
pub mod grpc_utils;
|
||||
pub mod grpc_utils;
|
||||
|
|
|
@ -5,7 +5,9 @@ use crate::grpc_multiplex::{
|
|||
};
|
||||
use anyhow::Context;
|
||||
use futures::StreamExt;
|
||||
use geyser_grpc_connector::yellowstone_grpc_util::{connect_with_timeout_with_buffers, GeyserGrpcClientBufferConfig};
|
||||
use geyser_grpc_connector::yellowstone_grpc_util::{
|
||||
connect_with_timeout_with_buffers, GeyserGrpcClientBufferConfig,
|
||||
};
|
||||
use geyser_grpc_connector::GrpcSourceConfig;
|
||||
use itertools::Itertools;
|
||||
use log::trace;
|
||||
|
|
|
@ -209,8 +209,10 @@ pub async fn start_lite_rpc(args: Config, rpc_client: Arc<RpcClient>) -> anyhow:
|
|||
|
||||
let account_service = AccountService::new(account_storage, account_notification_sender);
|
||||
|
||||
account_service
|
||||
.process_account_stream(account_stream.resubscribe(), blockinfo_notifier.resubscribe());
|
||||
account_service.process_account_stream(
|
||||
account_stream.resubscribe(),
|
||||
blockinfo_notifier.resubscribe(),
|
||||
);
|
||||
|
||||
account_service
|
||||
.populate_from_rpc(
|
||||
|
|
Loading…
Reference in New Issue