From 83ceedc091f3a26daf133eac54bad37e8fab76a6 Mon Sep 17 00:00:00 2001 From: "Jeff Washington (jwash)" <75863576+jeffwashington@users.noreply.github.com> Date: Wed, 2 Jun 2021 17:32:31 -0500 Subject: [PATCH] simplify test construction (#17686) --- runtime/src/accounts_db.rs | 32 ++++---------------------------- 1 file changed, 4 insertions(+), 28 deletions(-) diff --git a/runtime/src/accounts_db.rs b/runtime/src/accounts_db.rs index 6c3070ca3f..4bb68b0cfb 100644 --- a/runtime/src/accounts_db.rs +++ b/runtime/src/accounts_db.rs @@ -5894,34 +5894,10 @@ pub mod tests { let pubkey255 = Pubkey::new(&[0xffu8; 32]); let mut raw_expected = vec![ - CalculateHashIntermediate { - version: 0, - hash: Hash::default(), - lamports: 1, - slot, - pubkey: pubkey0, - }, - CalculateHashIntermediate { - version: 1, - hash: Hash::default(), - lamports: 128, - slot, - pubkey: pubkey127, - }, - CalculateHashIntermediate { - version: 2, - hash: Hash::default(), - lamports: 129, - slot, - pubkey: pubkey128, - }, - CalculateHashIntermediate { - version: 3, - hash: Hash::default(), - lamports: 256, - slot, - pubkey: pubkey255, - }, + CalculateHashIntermediate::new(0, Hash::default(), 1, slot, pubkey0), + CalculateHashIntermediate::new(1, Hash::default(), 128, slot, pubkey127), + CalculateHashIntermediate::new(2, Hash::default(), 129, slot, pubkey128), + CalculateHashIntermediate::new(3, Hash::default(), 256, slot, pubkey255), ]; let expected_hashes = vec![