Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Commit

Permalink
fix a test
Browse files Browse the repository at this point in the history
  • Loading branch information
HaoranYi committed Nov 6, 2023
1 parent 85f45ce commit 64e59c3
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions runtime/src/bank/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1602,7 +1602,11 @@ fn test_rent_eager_collect_rent_in_partition() {
let large_lamports = 123_456_789;
// genesis_config.epoch_schedule.slots_per_epoch == 432_000 and is unsuitable for this test
let some_slot = MINIMUM_SLOTS_PER_EPOCH; // chosen to cause epoch to be +1
let rent_collected = 1; // this is a function of 'some_slot'
let rent_collected = if bank.disable_rent_fees_collection() {
0
} else {
1 /* this is a function of 'some_slot' */
};

bank.store_account(
&zero_lamport_pubkey,
Expand Down Expand Up @@ -1652,9 +1656,9 @@ fn test_rent_eager_collect_rent_in_partition() {
bank.get_account(&rent_due_pubkey).unwrap().lamports(),
little_lamports - rent_collected
);
assert_eq!(
bank.get_account(&rent_due_pubkey).unwrap().rent_epoch(),
current_epoch + 1
assert!(
bank.get_account(&rent_due_pubkey).unwrap().rent_epoch() == current_epoch + 1
|| bank.disable_rent_fees_collection()
);
assert_eq!(
bank.get_account(&rent_exempt_pubkey).unwrap().lamports(),
Expand Down

0 comments on commit 64e59c3

Please sign in to comment.