mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-10-30 15:39:49 +00:00
Switch trie cache random seed (#1935)
Use a more secure seed for hashsets of cache.
This commit is contained in:
1 parent
e1e0381380
commit
f4c4c0fe29
3 files changed
+8
-1
No files matched your search
+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