Fix rebase...
This commit is contained in:
committed by
Michael Vines
parent
f029af0fca
commit
3a7e5e65e4
@ -5993,7 +5993,7 @@ pub(crate) mod tests {
|
|||||||
let bank = updater();
|
let bank = updater();
|
||||||
let new = bank.capitalization();
|
let new = bank.capitalization();
|
||||||
asserter(old, new);
|
asserter(old, new);
|
||||||
assert_eq!(bank.capitalization(), bank.calculate_capitalization());
|
assert_eq!(bank.capitalization(), bank.calculate_capitalization(true));
|
||||||
bank
|
bank
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -11782,13 +11782,13 @@ pub(crate) mod tests {
|
|||||||
|
|
||||||
let bank2 =
|
let bank2 =
|
||||||
Bank::new_from_parent(&bank1, &Pubkey::default(), bank1.first_slot_in_next_epoch());
|
Bank::new_from_parent(&bank1, &Pubkey::default(), bank1.first_slot_in_next_epoch());
|
||||||
assert_eq!(bank2.get_program_accounts(&sysvar::id()).len(), 8);
|
assert_eq!(bank2.get_program_accounts(&sysvar::id()).unwrap().len(), 8);
|
||||||
|
|
||||||
// force rent collection for sysvars
|
// force rent collection for sysvars
|
||||||
bank2.collect_rent_in_partition((0, 0, 1)); // all range
|
bank2.collect_rent_in_partition((0, 0, 1)); // all range
|
||||||
|
|
||||||
// no sysvar should be deleted due to rent
|
// no sysvar should be deleted due to rent
|
||||||
assert_eq!(bank2.get_program_accounts(&sysvar::id()).len(), 8);
|
assert_eq!(bank2.get_program_accounts(&sysvar::id()).unwrap().len(), 8);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
@ -11820,7 +11820,7 @@ pub(crate) mod tests {
|
|||||||
);
|
);
|
||||||
|
|
||||||
{
|
{
|
||||||
let sysvars = bank1.get_program_accounts(&sysvar::id());
|
let sysvars = bank1.get_program_accounts(&sysvar::id()).unwrap();
|
||||||
assert_eq!(sysvars.len(), 8);
|
assert_eq!(sysvars.len(), 8);
|
||||||
assert!(sysvars
|
assert!(sysvars
|
||||||
.iter()
|
.iter()
|
||||||
@ -11853,7 +11853,7 @@ pub(crate) mod tests {
|
|||||||
);
|
);
|
||||||
|
|
||||||
{
|
{
|
||||||
let sysvars = bank2.get_program_accounts(&sysvar::id());
|
let sysvars = bank2.get_program_accounts(&sysvar::id()).unwrap();
|
||||||
assert_eq!(sysvars.len(), 8);
|
assert_eq!(sysvars.len(), 8);
|
||||||
assert!(sysvars
|
assert!(sysvars
|
||||||
.iter()
|
.iter()
|
||||||
@ -11913,6 +11913,8 @@ pub(crate) mod tests {
|
|||||||
Some(&builtins),
|
Some(&builtins),
|
||||||
AccountSecondaryIndexes::default(),
|
AccountSecondaryIndexes::default(),
|
||||||
false,
|
false,
|
||||||
|
AccountShrinkThreshold::default(),
|
||||||
|
false,
|
||||||
));
|
));
|
||||||
// move to next epoch to create now deprecated rewards sysvar intentionally
|
// move to next epoch to create now deprecated rewards sysvar intentionally
|
||||||
let bank1 = Arc::new(Bank::new_from_parent(
|
let bank1 = Arc::new(Bank::new_from_parent(
|
||||||
@ -11927,7 +11929,7 @@ pub(crate) mod tests {
|
|||||||
&feature::create_account(&Feature { activated_at: None }, feature_balance),
|
&feature::create_account(&Feature { activated_at: None }, feature_balance),
|
||||||
);
|
);
|
||||||
{
|
{
|
||||||
let sysvars = bank1.get_program_accounts(&sysvar::id());
|
let sysvars = bank1.get_program_accounts(&sysvar::id()).unwrap();
|
||||||
assert_eq!(sysvars.len(), 9);
|
assert_eq!(sysvars.len(), 9);
|
||||||
assert!(sysvars
|
assert!(sysvars
|
||||||
.iter()
|
.iter()
|
||||||
@ -11960,7 +11962,7 @@ pub(crate) mod tests {
|
|||||||
},
|
},
|
||||||
);
|
);
|
||||||
{
|
{
|
||||||
let sysvars = bank2.get_program_accounts(&sysvar::id());
|
let sysvars = bank2.get_program_accounts(&sysvar::id()).unwrap();
|
||||||
assert_eq!(sysvars.len(), 9);
|
assert_eq!(sysvars.len(), 9);
|
||||||
assert!(sysvars
|
assert!(sysvars
|
||||||
.iter()
|
.iter()
|
||||||
|
@ -64,7 +64,7 @@ impl RentCollector {
|
|||||||
) -> u64 {
|
) -> u64 {
|
||||||
if account.executable() // executable accounts must be rent-exempt balance
|
if account.executable() // executable accounts must be rent-exempt balance
|
||||||
|| account.rent_epoch() > self.epoch
|
|| account.rent_epoch() > self.epoch
|
||||||
|| (!rent_for_sysvars && sysvar::check_id(&account.owner()))
|
|| (!rent_for_sysvars && sysvar::check_id(account.owner()))
|
||||||
|| *address == incinerator::id()
|
|| *address == incinerator::id()
|
||||||
{
|
{
|
||||||
0
|
0
|
||||||
|
Reference in New Issue
Block a user