diff --git a/runtime/src/bank.rs b/runtime/src/bank.rs index 48a6e9bdc39ba9..5f2d5a0ffd94ce 100644 --- a/runtime/src/bank.rs +++ b/runtime/src/bank.rs @@ -3236,6 +3236,10 @@ impl Bank { // committed before this write lock can be obtained here. let mut hash = self.hash.write().unwrap(); if *hash == Hash::default() { + // there should be no active scheduler at this point, which + // might be actively mutating bank state... + assert!(!self.with_scheduler()); + // finish up any deferred changes to account state self.collect_rent_eagerly(); self.collect_fees();