Secure sysvars under hash by freezing all strictly (#7892)
* Secure sysvars under hash by freezing all strictly * Fix hash's non-idempotnet and add new test * Clean up * More cleanups
This commit is contained in:
@@ -664,7 +664,6 @@ mod tests {
|
||||
use solana_sdk::rent::Rent;
|
||||
use solana_sdk::signature::{Keypair, KeypairUtil};
|
||||
use solana_sdk::system_program;
|
||||
use solana_sdk::sysvar;
|
||||
use solana_sdk::transaction::Transaction;
|
||||
use std::io::Cursor;
|
||||
use std::sync::atomic::{AtomicBool, AtomicU64, Ordering};
|
||||
@@ -1295,14 +1294,6 @@ mod tests {
|
||||
accounts.bank_hash_at(0);
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[should_panic]
|
||||
fn test_accounts_empty_account_bank_hash() {
|
||||
let accounts = Accounts::new(Vec::new());
|
||||
accounts.store_slow(0, &Pubkey::default(), &Account::new(1, 0, &sysvar::id()));
|
||||
accounts.bank_hash_at(0);
|
||||
}
|
||||
|
||||
fn check_accounts(accounts: &Accounts, pubkeys: &Vec<Pubkey>, num: usize) {
|
||||
for _ in 1..num {
|
||||
let idx = thread_rng().gen_range(0, num - 1);
|
||||
|
Reference in New Issue
Block a user