Cargo fmt
This commit is contained in:
parent
3a8ce5e95c
commit
4e66872a6e
|
@ -51,7 +51,7 @@ impl JsonRpcLeaderGetter {
|
|||
.get_slot_leaders(first_slot_to_fetch, last_slot_needed - first_slot_to_fetch)
|
||||
.await
|
||||
.context("failed to get slot leaders")?;
|
||||
|
||||
|
||||
for leader_slot in first_slot_to_fetch..last_slot_needed {
|
||||
let current_leader = (leader_slot - first_slot_to_fetch) as usize;
|
||||
let pubkey = leaders[current_leader];
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
use crate::{
|
||||
DEFAULT_FANOUT_SIZE, DEFAULT_RETRY_TIMEOUT, DEFAULT_RPC_ADDR, DEFAULT_WS_ADDR, MAX_RETRIES, DEFAULT_GRPC_ADDR
|
||||
DEFAULT_FANOUT_SIZE, DEFAULT_GRPC_ADDR, DEFAULT_RETRY_TIMEOUT, DEFAULT_RPC_ADDR,
|
||||
DEFAULT_WS_ADDR, MAX_RETRIES,
|
||||
};
|
||||
use clap::Parser;
|
||||
|
||||
|
|
|
@ -39,4 +39,4 @@ pub const DEFAULT_TRANSACTION_CONFIRMATION_STATUS: TransactionConfirmationStatus
|
|||
pub const DEFAULT_GRPC_ADDR: &str = "http://127.0.0.0:10000";
|
||||
|
||||
#[from_env]
|
||||
pub const GRPC_VERSION: &str = "1.16.1";
|
||||
pub const GRPC_VERSION: &str = "1.16.1";
|
||||
|
|
|
@ -5,10 +5,10 @@ use std::time::Duration;
|
|||
use anyhow::bail;
|
||||
use clap::Parser;
|
||||
use dotenv::dotenv;
|
||||
use lite_rpc::{DEFAULT_MAX_NUMBER_OF_TXS_IN_QUEUE, GRPC_VERSION};
|
||||
use lite_rpc::postgres::Postgres;
|
||||
use lite_rpc::service_spawner::ServiceSpawner;
|
||||
use lite_rpc::{bridge::LiteBridge, cli::Args};
|
||||
use lite_rpc::{DEFAULT_MAX_NUMBER_OF_TXS_IN_QUEUE, GRPC_VERSION};
|
||||
|
||||
use solana_lite_rpc_cluster_endpoints::endpoint_stremers::EndpointStreaming;
|
||||
use solana_lite_rpc_cluster_endpoints::grpc_subscription::create_grpc_subscription;
|
||||
|
@ -120,8 +120,7 @@ pub async fn start_lite_rpc(args: Args) -> anyhow::Result<()> {
|
|||
|
||||
// rpc client
|
||||
let rpc_client = Arc::new(RpcClient::new(rpc_addr.clone()));
|
||||
let (subscriptions, cluster_endpoint_tasks) = if use_grpc
|
||||
{
|
||||
let (subscriptions, cluster_endpoint_tasks) = if use_grpc {
|
||||
create_grpc_subscription(rpc_client.clone(), grpc_addr, GRPC_VERSION.to_string())?
|
||||
} else {
|
||||
create_json_rpc_polling_subscription(rpc_client.clone())?
|
||||
|
|
Loading…
Reference in New Issue