lite-rpc/src/lib.rs

34 lines
949 B
Rust
Raw Normal View History

use const_env::from_env;
2023-01-10 06:56:41 -08:00
use solana_transaction_status::TransactionConfirmationStatus;
2023-01-02 03:44:07 -08:00
2022-12-16 18:35:49 -08:00
pub mod bridge;
pub mod cli;
pub mod configs;
pub mod encoding;
2023-01-03 01:50:09 -08:00
pub mod errors;
2023-01-27 12:35:29 -08:00
pub mod postgres;
2022-12-16 18:35:49 -08:00
pub mod rpc;
2023-01-16 23:05:24 -08:00
pub mod tpu_manager;
2023-01-16 23:06:00 -08:00
pub mod workers;
2022-12-16 18:35:49 -08:00
#[from_env]
pub const DEFAULT_RPC_ADDR: &str = "http://0.0.0.0:8899";
#[from_env]
pub const DEFAULT_LITE_RPC_ADDR: &str = "http://0.0.0.0:8890";
#[from_env]
pub const DEFAULT_WS_ADDR: &str = "ws://0.0.0.0:8900";
#[from_env]
2022-12-16 18:35:49 -08:00
pub const DEFAULT_TX_MAX_RETRIES: u16 = 1;
#[from_env]
2023-01-10 06:56:41 -08:00
pub const DEFAULT_TX_BATCH_SIZE: usize = 1 << 7;
#[from_env]
2023-01-10 07:45:30 -08:00
pub const DEFAULT_FANOUT_SIZE: u64 = 32;
#[from_env]
2023-01-10 06:56:41 -08:00
pub const DEFAULT_TX_BATCH_INTERVAL_MS: u64 = 1;
2023-01-09 23:06:24 -08:00
#[from_env]
2023-01-10 06:59:37 -08:00
pub const DEFAULT_CLEAN_INTERVAL_MS: u64 = 5 * 60 * 1000; // five minute
#[from_env]
2023-01-10 06:56:41 -08:00
pub const DEFAULT_TX_SENT_TTL_S: u64 = 12;
2023-01-09 23:06:24 -08:00
pub const DEFAULT_TRANSACTION_CONFIRMATION_STATUS: TransactionConfirmationStatus =
TransactionConfirmationStatus::Finalized;