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

Commit 9769288

Browse files
committed
Assert there's no active scheduler before freezing
1 parent 3ba582b commit 9769288

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

runtime/src/bank.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1475,6 +1475,10 @@ impl Bank {
14751475
let mut time = Measure::start("bank::new_from_parent");
14761476
let NewBankOptions { vote_only_bank } = new_bank_options;
14771477

1478+
// there should be no active scheduler at this point, which
1479+
// might be actively mutating bank state...
1480+
assert!(!parent.with_scheduler());
1481+
14781482
parent.freeze();
14791483
assert_ne!(slot, parent.slot());
14801484

0 commit comments

Comments
 (0)