Skip to content
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
22 changes: 15 additions & 7 deletions runtime/src/bank/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7683,13 +7683,17 @@ fn test_store_scan_consistency_unrooted() {

#[test]
fn test_store_scan_consistency_root() {
let (pruned_banks_sender, pruned_banks_receiver) = unbounded();
let pruned_banks_request_handler = PrunedBanksRequestHandler {
pruned_banks_receiver,
};
test_store_scan_consistency(
|bank0,
bank_to_scan_sender,
_scan_finished_receiver,
pubkeys_to_modify,
program_id,
starting_lamports| {
move |bank0,
bank_to_scan_sender,
_scan_finished_receiver,
pubkeys_to_modify,
program_id,
starting_lamports| {
let mut current_bank = bank0.clone();
let mut prev_bank = bank0;
loop {
Expand Down Expand Up @@ -7722,9 +7726,13 @@ fn test_store_scan_consistency_root() {
&solana_pubkey::new_rand(),
slot,
));

// Move purge here so that Bank::drop()->purge_slots() doesn't race
// with clean. Simulates the call from AccountsBackgroundService
pruned_banks_request_handler.handle_request(&current_bank);
}
},
None,
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was this None originally though?

Copy link
Copy Markdown
Author

@roryharr roryharr Oct 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I spent some time on that. All the tests were originally None, but unrooted_slot was updated a long time ago during a refactor: solana-labs#17319

I checked out that changeset and got it to build. test_store_scan_consistency_root was passing at that time even with the added delay. Sometime between then and now something changed.

Some(Box::new(SendDroppedBankCallback::new(pruned_banks_sender))),
AcceptableScanResults::NoFailure,
);
}
Expand Down
Loading