minor test code cleanup (#17645)
This commit is contained in:
committed by
GitHub
parent
d47990e753
commit
107af52deb
@ -845,7 +845,7 @@ pub mod tests {
|
|||||||
fn test_accountsdb_rest_of_hash_calculation() {
|
fn test_accountsdb_rest_of_hash_calculation() {
|
||||||
solana_logger::setup();
|
solana_logger::setup();
|
||||||
|
|
||||||
let mut account_maps: Vec<CalculateHashIntermediate> = Vec::new();
|
let mut account_maps = Vec::new();
|
||||||
|
|
||||||
let key = Pubkey::new(&[11u8; 32]);
|
let key = Pubkey::new(&[11u8; 32]);
|
||||||
let hash = Hash::new(&[1u8; 32]);
|
let hash = Hash::new(&[1u8; 32]);
|
||||||
@ -913,7 +913,7 @@ pub mod tests {
|
|||||||
// 1: NON-empty, empty final
|
// 1: NON-empty, empty final
|
||||||
// 2: NON-empty, empty, empty final
|
// 2: NON-empty, empty, empty final
|
||||||
for pass in 0..3 {
|
for pass in 0..3 {
|
||||||
let mut account_maps: Vec<CalculateHashIntermediate> = Vec::new();
|
let mut account_maps = Vec::new();
|
||||||
|
|
||||||
let key = Pubkey::new(&[11u8; 32]);
|
let key = Pubkey::new(&[11u8; 32]);
|
||||||
let hash = Hash::new(&[1u8; 32]);
|
let hash = Hash::new(&[1u8; 32]);
|
||||||
@ -1000,7 +1000,7 @@ pub mod tests {
|
|||||||
fn test_accountsdb_multi_pass_rest_of_hash_calculation_partial() {
|
fn test_accountsdb_multi_pass_rest_of_hash_calculation_partial() {
|
||||||
solana_logger::setup();
|
solana_logger::setup();
|
||||||
|
|
||||||
let mut account_maps: Vec<CalculateHashIntermediate> = Vec::new();
|
let mut account_maps = Vec::new();
|
||||||
|
|
||||||
let key = Pubkey::new(&[11u8; 32]);
|
let key = Pubkey::new(&[11u8; 32]);
|
||||||
let hash = Hash::new(&[1u8; 32]);
|
let hash = Hash::new(&[1u8; 32]);
|
||||||
@ -1074,7 +1074,7 @@ pub mod tests {
|
|||||||
fn test_accountsdb_multi_pass_rest_of_hash_calculation_partial_hashes() {
|
fn test_accountsdb_multi_pass_rest_of_hash_calculation_partial_hashes() {
|
||||||
solana_logger::setup();
|
solana_logger::setup();
|
||||||
|
|
||||||
let mut account_maps: Vec<CalculateHashIntermediate> = Vec::new();
|
let mut account_maps = Vec::new();
|
||||||
|
|
||||||
const TARGET_FANOUT_LEVEL: usize = 3;
|
const TARGET_FANOUT_LEVEL: usize = 3;
|
||||||
let target_fanout = MERKLE_FANOUT.pow(TARGET_FANOUT_LEVEL as u32);
|
let target_fanout = MERKLE_FANOUT.pow(TARGET_FANOUT_LEVEL as u32);
|
||||||
@ -1516,7 +1516,7 @@ pub mod tests {
|
|||||||
|
|
||||||
let key = Pubkey::new_unique();
|
let key = Pubkey::new_unique();
|
||||||
let hash = Hash::new_unique();
|
let hash = Hash::new_unique();
|
||||||
let mut account_maps: Vec<CalculateHashIntermediate> = Vec::new();
|
let mut account_maps = Vec::new();
|
||||||
let val = CalculateHashIntermediate::new(0, hash, 1, Slot::default(), key);
|
let val = CalculateHashIntermediate::new(0, hash, 1, Slot::default(), key);
|
||||||
account_maps.push(val.clone());
|
account_maps.push(val.clone());
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user