mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-09 20:11:09 +00:00
Switch trie cache random seed (#1935)
Use a more secure seed for hashsets of cache.
This commit is contained in:
+5
-1
@@ -30,7 +30,11 @@ use std::{
|
||||
use trie_db::{node::NodeOwned, CachedValue};
|
||||
|
||||
lazy_static::lazy_static! {
|
||||
static ref RANDOM_STATE: ahash::RandomState = ahash::RandomState::default();
|
||||
static ref RANDOM_STATE: ahash::RandomState = {
|
||||
use rand::Rng;
|
||||
let mut rng = rand::thread_rng();
|
||||
ahash::RandomState::generate_with(rng.gen(), rng.gen(), rng.gen(), rng.gen())
|
||||
};
|
||||
}
|
||||
|
||||
pub struct SharedNodeCacheLimiter {
|
||||
|
||||
Reference in New Issue
Block a user