From 59f4fba05ca6d8a4f094b344ec48bdce2c0b438b Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 4 Jun 2021 15:57:11 +0000 Subject: [PATCH] simplify test construction (#17686) (#17693) (cherry picked from commit 83ceedc091f3a26daf133eac54bad37e8fab76a6) # Conflicts: # runtime/src/accounts_db.rs Co-authored-by: Jeff Washington (jwash) <75863576+jeffwashington@users.noreply.github.com> --- 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 bb5f0d6e30..e5f088a29b 100644 --- a/runtime/src/accounts_db.rs +++ b/runtime/src/accounts_db.rs @@ -5715,34 +5715,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![