cargo fmt
This commit is contained in:
parent
260a2f104b
commit
50c3b43a8b
|
@ -2,7 +2,7 @@ use std::time::Duration;
|
||||||
|
|
||||||
use anyhow::{bail, Context};
|
use anyhow::{bail, Context};
|
||||||
use prometheus::core::GenericGauge;
|
use prometheus::core::GenericGauge;
|
||||||
use prometheus::{register_int_gauge, opts, IntCounter, register_int_counter};
|
use prometheus::{opts, register_int_counter, register_int_gauge, IntCounter};
|
||||||
use solana_lite_rpc_core::block_information_store::BlockInformation;
|
use solana_lite_rpc_core::block_information_store::BlockInformation;
|
||||||
use solana_lite_rpc_core::data_cache::DataCache;
|
use solana_lite_rpc_core::data_cache::DataCache;
|
||||||
use solana_lite_rpc_core::streams::{
|
use solana_lite_rpc_core::streams::{
|
||||||
|
@ -12,7 +12,6 @@ use solana_lite_rpc_core::AnyhowJoinHandle;
|
||||||
use solana_sdk::commitment_config::CommitmentLevel;
|
use solana_sdk::commitment_config::CommitmentLevel;
|
||||||
use solana_transaction_status::{TransactionConfirmationStatus, TransactionStatus};
|
use solana_transaction_status::{TransactionConfirmationStatus, TransactionStatus};
|
||||||
|
|
||||||
|
|
||||||
lazy_static::lazy_static! {
|
lazy_static::lazy_static! {
|
||||||
static ref NB_CLUSTER_NODES: GenericGauge<prometheus::core::AtomicI64> =
|
static ref NB_CLUSTER_NODES: GenericGauge<prometheus::core::AtomicI64> =
|
||||||
register_int_gauge!(opts!("literpc_nb_cluster_nodes", "Number of cluster nodes in saved")).unwrap();
|
register_int_gauge!(opts!("literpc_nb_cluster_nodes", "Number of cluster nodes in saved")).unwrap();
|
||||||
|
@ -25,10 +24,10 @@ lazy_static::lazy_static! {
|
||||||
|
|
||||||
static ref TXS_CONFIRMED: IntCounter =
|
static ref TXS_CONFIRMED: IntCounter =
|
||||||
register_int_counter!(opts!("literpc_txs_confirmed", "Number of Transactions Confirmed")).unwrap();
|
register_int_counter!(opts!("literpc_txs_confirmed", "Number of Transactions Confirmed")).unwrap();
|
||||||
|
|
||||||
static ref TXS_FINALIZED: IntCounter =
|
static ref TXS_FINALIZED: IntCounter =
|
||||||
register_int_counter!(opts!("literpc_txs_finalized", "Number of Transactions Finalized")).unwrap();
|
register_int_counter!(opts!("literpc_txs_finalized", "Number of Transactions Finalized")).unwrap();
|
||||||
|
|
||||||
static ref TXS_PROCESSED: IntCounter =
|
static ref TXS_PROCESSED: IntCounter =
|
||||||
register_int_counter!(opts!("literpc_txs_processed", "Number of Transactions Processed")).unwrap();
|
register_int_counter!(opts!("literpc_txs_processed", "Number of Transactions Processed")).unwrap();
|
||||||
}
|
}
|
||||||
|
@ -65,7 +64,6 @@ impl DataCachingService {
|
||||||
CommitmentLevel::Finalized => TransactionConfirmationStatus::Finalized,
|
CommitmentLevel::Finalized => TransactionConfirmationStatus::Finalized,
|
||||||
CommitmentLevel::Confirmed => TransactionConfirmationStatus::Confirmed,
|
CommitmentLevel::Confirmed => TransactionConfirmationStatus::Confirmed,
|
||||||
_ => TransactionConfirmationStatus::Processed,
|
_ => TransactionConfirmationStatus::Processed,
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
for tx in block.txs {
|
for tx in block.txs {
|
||||||
|
@ -83,13 +81,13 @@ impl DataCachingService {
|
||||||
match confirmation_status {
|
match confirmation_status {
|
||||||
TransactionConfirmationStatus::Finalized => {
|
TransactionConfirmationStatus::Finalized => {
|
||||||
TXS_FINALIZED.inc();
|
TXS_FINALIZED.inc();
|
||||||
},
|
}
|
||||||
TransactionConfirmationStatus::Confirmed => {
|
TransactionConfirmationStatus::Confirmed => {
|
||||||
TXS_CONFIRMED.inc();
|
TXS_CONFIRMED.inc();
|
||||||
},
|
}
|
||||||
TransactionConfirmationStatus::Processed => {
|
TransactionConfirmationStatus::Processed => {
|
||||||
TXS_PROCESSED.inc();
|
TXS_PROCESSED.inc();
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// notify
|
// notify
|
||||||
|
|
Loading…
Reference in New Issue