Skip to content

Commit 81b615f

Browse files
authored
use ahash for mapping blockhash q (#3789)
1 parent 42df56c commit 81b615f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

accounts-db/src/blockhash_queue.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ impl HashInfo {
2626
#[cfg_attr(
2727
feature = "frozen-abi",
2828
derive(AbiExample),
29-
frozen_abi(digest = "2GFWjonjAdte2KsJthPzFdSvVKJ4viKYTPzUHB8dzjtE")
29+
frozen_abi(digest = "DZVVXt4saSgH1CWGrzBcX2sq5yswCuRqGx1Y1ZehtWT6")
3030
)]
3131
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
3232
pub struct BlockhashQueue {
@@ -36,7 +36,7 @@ pub struct BlockhashQueue {
3636
/// last hash to be registered
3737
last_hash: Option<Hash>,
3838

39-
hashes: HashMap<Hash, HashInfo>,
39+
hashes: HashMap<Hash, HashInfo, ahash::RandomState>,
4040

4141
/// hashes older than `max_age` will be dropped from the queue
4242
max_age: usize,
@@ -51,7 +51,7 @@ impl Default for BlockhashQueue {
5151
impl BlockhashQueue {
5252
pub fn new(max_age: usize) -> Self {
5353
Self {
54-
hashes: HashMap::new(),
54+
hashes: HashMap::default(),
5555
last_hash_index: 0,
5656
last_hash: None,
5757
max_age,

runtime/src/bank/serde_snapshot.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,7 @@ mod tests {
570570
#[cfg_attr(
571571
feature = "frozen-abi",
572572
derive(AbiExample),
573-
frozen_abi(digest = "DVmmgXfBgsFRjX2Yun7Wcyt2gafnMVHvTRXBVUHeL3NC")
573+
frozen_abi(digest = "9THbM4acSoJYENSTHp1qBdXyvPr3qUQTSTkotUNkFc76")
574574
)]
575575
#[derive(Serialize)]
576576
pub struct BankAbiTestWrapper {

0 commit comments

Comments
 (0)