Account for possibility of cache flush in load() (#15454)
* Account for possibility of cache flush in load() * More cleaning * More cleaning * Remove unused method and some comment cleaning * Fix typo * Make the detected impossible purge race panic()! * Finally revert to original .expect() * Fix typos... * Add assertion for max_root for easier reasoning * Reframe races with LoadHint as possible opt. * Fix test * Make race bug tests run longer for less flaky * Delay the clone-in-lock slow path even for RPC * Make get_account panic-free & add its onchain ver. * Fix rebase conflicts... * Clean up * Clean up comment * Revert fn name change * Fix flaky test... * fmt... Co-authored-by: Ryo Onodera <ryoqun@gmail.com>
This commit is contained in:
@ -434,7 +434,7 @@ impl<'a> InvokeContext for ThisInvokeContext<'a> {
|
||||
// Load it
|
||||
result = self
|
||||
.account_db
|
||||
.load_slow(self.ancestors, id)
|
||||
.load_with_fixed_root(self.ancestors, id)
|
||||
.map(|(account, _)| Rc::new(account.data().clone()));
|
||||
// Cache it
|
||||
self.sysvars.push((*id, result.clone()));
|
||||
|
Reference in New Issue
Block a user