Move storage bound checking to driver
This commit is contained in:
@@ -145,7 +145,6 @@ const PAGE_SIZE: usize = 0x1000;
|
||||
// 0xc0000-0xfffff: Store
|
||||
#[cfg(not(any(test, feature = "ram_storage")))]
|
||||
const STORE_ADDR: usize = 0xC0000;
|
||||
const STORE_SIZE_LIMIT: usize = 0x40000;
|
||||
const STORE_SIZE: usize = NUM_PAGES * PAGE_SIZE;
|
||||
|
||||
impl PersistentStore {
|
||||
@@ -155,8 +154,6 @@ impl PersistentStore {
|
||||
///
|
||||
/// This should be at most one instance of persistent store per program lifetime.
|
||||
pub fn new(rng: &mut impl Rng256) -> PersistentStore {
|
||||
// This should ideally be a compile-time assert, but Rust doesn't have native support.
|
||||
assert!(STORE_SIZE <= STORE_SIZE_LIMIT);
|
||||
#[cfg(not(any(test, feature = "ram_storage")))]
|
||||
let storage = PersistentStore::new_prod_storage();
|
||||
#[cfg(any(test, feature = "ram_storage"))]
|
||||
|
||||
Reference in New Issue
Block a user