Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds datapoint if rent collection changes only the rent epoch #2922

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions runtime/src/bank.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4322,8 +4322,8 @@ impl Bank {
let rent_epoch_post = account.rent_epoch();

// did the account change in any way due to rent collection?
let account_changed =
rent_collected_info.rent_amount != 0 || rent_epoch_post != rent_epoch_pre;
let rent_epoch_changed = rent_epoch_post != rent_epoch_pre;
let account_changed = rent_collected_info.rent_amount != 0 || rent_epoch_changed;

// always store the account, regardless if it changed or not
let always_store_accounts =
Expand Down Expand Up @@ -4361,6 +4361,17 @@ impl Bank {
);
}
}
} else {
debug_assert_eq!(rent_collected_info.rent_amount, 0);
if rent_epoch_changed {
datapoint_info!(
"bank-rent_collection_updated_only_rent_epoch",
("slot", self.slot(), i64),
("pubkey", pubkey.to_string(), String),
("rent_epoch_pre", rent_epoch_pre, i64),
("rent_epoch_post", rent_epoch_post, i64),
);
}
}
total_rent_collected_info += rent_collected_info;
accounts_to_store.push((pubkey, account));
Expand Down
Loading