Skip to content

Commit bb4800e

Browse files
committed
Resolve conflicts, adjust to the old rand API
1 parent 8d5a9c8 commit bb4800e

File tree

2 files changed

+5
-13
lines changed

2 files changed

+5
-13
lines changed

accounts-db/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ modular-bitfield = { workspace = true }
5454
num_cpus = { workspace = true }
5555
num_enum = { workspace = true }
5656
qualifier_attr = { workspace = true, optional = true }
57-
rand = { workspace = true }
57+
rand = { workspace = true, features = ["small_rng"] }
5858
rayon = { workspace = true }
5959
seqlock = { workspace = true }
6060
serde = { workspace = true, features = ["rc"] }

accounts-db/src/read_only_accounts_cache.rs

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,15 @@
22
//! which can be large, loaded many times, and rarely change.
33
#[cfg(feature = "dev-context-only-utils")]
44
use qualifier_attr::{field_qualifiers, qualifiers};
5+
use rand::SeedableRng;
56
use {
67
ahash::random_state::RandomState as AHashRandomState,
78
dashmap::{mapref::entry::Entry, DashMap},
89
log::*,
910
rand::{
10-
<<<<<<< HEAD
11-
seq::{IteratorRandom, SliceRandom},
12-
thread_rng, Rng,
13-
=======
1411
rngs::SmallRng,
15-
seq::{IndexedRandom as _, IteratorRandom},
16-
Rng, SeedableRng,
17-
>>>>>>> 1ffcdcc60 (accounts-db: Use `SmallRng` for LRU eviction sampling (#10640))
12+
seq::{IteratorRandom, SliceRandom},
13+
Rng,
1814
},
1915
solana_account::{AccountSharedData, ReadableAccount},
2016
solana_clock::Slot,
@@ -293,11 +289,7 @@ impl ReadOnlyAccountsCache {
293289
.name("solAcctReadCache".to_string())
294290
.spawn(move || {
295291
info!("AccountsReadCacheEvictor has started");
296-
<<<<<<< HEAD
297-
let mut rng = thread_rng();
298-
=======
299-
let mut rng = SmallRng::from_os_rng();
300-
>>>>>>> 1ffcdcc60 (accounts-db: Use `SmallRng` for LRU eviction sampling (#10640))
292+
let mut rng = SmallRng::from_entropy();
301293
loop {
302294
if exit.load(Ordering::Relaxed) {
303295
break;

0 commit comments

Comments
 (0)