Skip to content

Commit

Permalink
Sets requested tilde and fixes some clippy errors
Browse files Browse the repository at this point in the history
  • Loading branch information
mango-dee committed Nov 26, 2024
1 parent cea9013 commit f88ac48
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 54 deletions.
28 changes: 14 additions & 14 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,20 @@ license = "AGPL"
edition = "2021"

[workspace.dependencies]
solana-sdk = "2.0.16"
solana-rpc-client = "2.0.16"
solana-rpc-client-api = "2.0.16"
solana-transaction-status = "2.0.16"
solana-version = "2.0.16"
solana-client = "2.0.16"
solana-net-utils = "2.0.16"
solana-pubsub-client = "2.0.16"
solana-streamer = "2.0.16"
solana-account-decoder = "2.0.16"
solana-ledger = "2.0.16"
solana-program = "2.0.16"
solana-accounts-db = "2.0.16"
solana-address-lookup-table-program = "2.0.16"
solana-sdk = "~2.0.16"
solana-rpc-client = "~2.0.16"
solana-rpc-client-api = "~2.0.16"
solana-transaction-status = "~2.0.16"
solana-version = "~2.0.16"
solana-client = "~2.0.16"
solana-net-utils = "~2.0.16"
solana-pubsub-client = "~2.0.16"
solana-streamer = "~2.0.16"
solana-account-decoder = "~2.0.16"
solana-ledger = "~2.0.16"
solana-program = "~2.0.16"
solana-accounts-db = "~2.0.16"
solana-address-lookup-table-program = "~2.0.16"
itertools = "0.10.5"
rangetools = "0.1.4"
serde = { version = "1.0.160", features = ["derive"] }
Expand Down
2 changes: 1 addition & 1 deletion accounts/src/inmemory_account_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ impl AccountDataByCommitment {
.unwrap_or(true);

let mut updated = false;
if self.processed_accounts.get(&data.updated_slot).is_none() {
if !self.processed_accounts.contains_key(&data.updated_slot) {
// processed not present for the slot
self.processed_accounts
.insert(data.updated_slot, data.clone());
Expand Down
8 changes: 4 additions & 4 deletions address-lookup-tables/src/address_lookup_table_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ use std::{sync::Arc, time::Duration};
use async_trait::async_trait;
use dashmap::DashMap;
use itertools::Itertools;
use prometheus::{IntGauge, opts, register_int_gauge};
use prometheus::{opts, register_int_gauge, IntGauge};
use serde::{Deserialize, Serialize};
use solana_rpc_client::nonblocking::rpc_client::RpcClient;
use solana_sdk::{commitment_config::CommitmentConfig, pubkey::Pubkey};
use solana_sdk::address_lookup_table::state::AddressLookupTable;
use solana_sdk::{commitment_config::CommitmentConfig, pubkey::Pubkey};

use solana_lite_rpc_core::traits::address_lookup_table_interface::AddressLookupTableInterface;

Expand Down Expand Up @@ -222,12 +222,12 @@ impl AddressLookupTableInterface for AddressLookupTableStore {
&message_address_table_lookup.account_key,
&message_address_table_lookup.writable_indexes,
)
.await,
.await,
self.get_accounts(
&message_address_table_lookup.account_key,
&message_address_table_lookup.readonly_indexes,
)
.await,
.await,
)
}

Expand Down
27 changes: 0 additions & 27 deletions benchrunner-service/src/postgres/confirmation_slot.rs

This file was deleted.

1 change: 0 additions & 1 deletion benchrunner-service/src/postgres/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
pub mod confirmation_slot;
pub mod metrics_dbstore;
pub mod postgres_session;
pub mod postgres_session_cache;
6 changes: 3 additions & 3 deletions core/src/stores/block_information_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ impl BlockInformation {
}

/// - Block Information Store
/// This structure will store block information till where finalized block is still in range of last valid block hash.
/// So 300 blocks for last valid blockhash and 32 slots between confirmed and finalized.
/// So it should not store more than 400 blocks information.
/// This structure will store block information till where finalized block is still in range of last valid block hash.
/// So 300 blocks for last valid blockhash and 32 slots between confirmed and finalized.
/// So it should not store more than 400 blocks information.
#[derive(Clone)]
pub struct BlockInformationStore {
// maps Block Hash -> Block information
Expand Down
3 changes: 3 additions & 0 deletions services/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,6 @@ tracing = { workspace = true }
# note: version 0.5.6 has a known bug
crossbeam-channel = "0.5.6"
countmap = "0.2.0"

[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(loom)', 'cfg(tokio_unstable)'] }
4 changes: 2 additions & 2 deletions services/src/tpu_utils/tpu_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ use solana_lite_rpc_core::traits::leaders_fetcher_interface::LeaderFetcherInterf
use solana_lite_rpc_core::types::SlotStream;
use solana_lite_rpc_core::AnyhowJoinHandle;
use solana_sdk::{quic::QUIC_PORT_OFFSET, signature::Keypair, slot_history::Slot};
use std::collections::HashMap;
use std::{sync::Arc};
use solana_streamer::tls_certificates::new_dummy_x509_certificate;
use std::collections::HashMap;
use std::sync::Arc;

lazy_static::lazy_static! {
static ref NB_CLUSTER_NODES: GenericGauge<prometheus::core::AtomicI64> =
Expand Down
4 changes: 2 additions & 2 deletions util/src/histogram_nbuckets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ pub fn histogram(values: &[f64], bins: usize) -> Vec<(f64, usize)> {
assert!(bins >= 2);
let mut bucket: Vec<usize> = vec![0; bins];

let mut min = std::f64::MAX;
let mut max = std::f64::MIN;
let mut min = f64::MAX;
let mut max = f64::MIN;
for val in values {
min = min.min(*val);
max = max.max(*val);
Expand Down

0 comments on commit f88ac48

Please sign in to comment.