Delete unused create_test_recent_blockhashes

This commit is contained in:
Brian Anderson 2022-07-22 15:05:59 -06:00 committed by Trent Nelson
parent a94920a4ea
commit a69ee79111
1 changed files with 1 additions and 20 deletions

View File

@ -2,10 +2,7 @@
#![allow(clippy::integer_arithmetic)] #![allow(clippy::integer_arithmetic)]
use { use {
crate::{ crate::{
declare_deprecated_sysvar_id, declare_deprecated_sysvar_id, fee_calculator::FeeCalculator, hash::Hash, sysvar::Sysvar,
fee_calculator::FeeCalculator,
hash::{hash, Hash},
sysvar::Sysvar,
}, },
std::{cmp::Ordering, collections::BinaryHeap, iter::FromIterator, ops::Deref}, std::{cmp::Ordering, collections::BinaryHeap, iter::FromIterator, ops::Deref},
}; };
@ -145,22 +142,6 @@ impl Deref for RecentBlockhashes {
} }
} }
pub fn create_test_recent_blockhashes(start: usize) -> RecentBlockhashes {
let blocks: Vec<_> = (start..start + MAX_ENTRIES)
.map(|i| {
(
i as u64,
hash(&bincode::serialize(&i).unwrap()),
i as u64 * 100,
)
})
.collect();
blocks
.iter()
.map(|(i, hash, lamports_per_signature)| IterItem(*i, hash, *lamports_per_signature))
.collect()
}
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use {super::*, crate::clock::MAX_PROCESSING_AGE}; use {super::*, crate::clock::MAX_PROCESSING_AGE};