move Account to solana-sdk (#13198)

This commit is contained in:
Jack May
2020-10-28 22:01:07 -07:00
committed by GitHub
parent d5e439037b
commit c458d4b213
38 changed files with 460 additions and 459 deletions

View File

@ -2,9 +2,9 @@
extern crate test;
use solana_sdk::{
account::{create_account, from_account},
hash::Hash,
slot_hashes::{Slot, SlotHashes, MAX_ENTRIES},
sysvar::Sysvar,
};
use test::Bencher;
@ -15,7 +15,7 @@ fn bench_to_from_account(b: &mut Bencher) {
slot_hashes.add(i as Slot, Hash::default());
}
b.iter(|| {
let account = slot_hashes.create_account(0);
slot_hashes = SlotHashes::from_account(&account).unwrap();
let account = create_account(&slot_hashes, 0);
slot_hashes = from_account::<SlotHashes>(&account).unwrap();
});
}