simplify test construction (#17686) (#17693)

(cherry picked from commit 83ceedc091)

# Conflicts:
#	runtime/src/accounts_db.rs

Co-authored-by: Jeff Washington (jwash) <75863576+jeffwashington@users.noreply.github.com>
This commit is contained in:
mergify[bot]
2021-06-04 15:57:11 +00:00
committed by GitHub
parent c0c764377c
commit 59f4fba05c

View File

@ -5715,34 +5715,10 @@ pub mod tests {
let pubkey255 = Pubkey::new(&[0xffu8; 32]); let pubkey255 = Pubkey::new(&[0xffu8; 32]);
let mut raw_expected = vec![ let mut raw_expected = vec![
CalculateHashIntermediate { CalculateHashIntermediate::new(0, Hash::default(), 1, slot, pubkey0),
version: 0, CalculateHashIntermediate::new(1, Hash::default(), 128, slot, pubkey127),
hash: Hash::default(), CalculateHashIntermediate::new(2, Hash::default(), 129, slot, pubkey128),
lamports: 1, CalculateHashIntermediate::new(3, Hash::default(), 256, slot, pubkey255),
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,
},
]; ];
let expected_hashes = vec![ let expected_hashes = vec![