/// Strips away the deltas from all page maps of the replicated state.
/// We execute this procedure before making a checkpoint because we
/// don't want those deltas to be persisted to TIP as we apply deltas
/// incrementally after every round.
Strips away the deltas from all page maps of the replicated state.
We execute this procedure before making a checkpoint because we
don't want those deltas to be persisted to TIP as we apply deltas
incrementally after every round.
Strips away the deltas from all page maps of the replicated state . We execute this procedure before making a checkpoint because we don ' t want those deltas to be persisted to TIP as we apply deltas incrementally after every round .
fn strip_page_map_deltas(state: &mut ReplicatedState) {
    for canister in state.canisters_iter_mut() {
        if let Some(execution_state) = &mut canister.execution_state {
            execution_state.wasm_memory.page_map.strip_all_deltas();
            execution_state.stable_memory.page_map.strip_all_deltas();
            // Reset the sandbox state to force full synchronization on the next execution
            // since the page deltas are out of sync now.
            execution_state.wasm_memory.sandbox_memory = SandboxMemory::new();
            execution_state.stable_memory.sandbox_memory = SandboxMemory::new();
        }
    }
}
fn strip_page_map_deltas ( state : & mut ReplicatedState ) { for canister in state . canisters_iter_mut ( ) { if let Some ( execution_state ) = & mut canister . execution_state { execution_state . wasm_memory . page_map . strip_all_deltas ( ) ; execution_state . stable_memory . page_map . strip_all_deltas ( ) ; // Reset the sandbox state to force full synchronization on the next execution // since the page deltas are out of sync now. execution_state . wasm_memory . sandbox_memory = SandboxMemory :: new ( ) ; execution_state . stable_memory . sandbox_memory = SandboxMemory :: new ( ) ; } } }
Strips away the deltas from all page maps of the replicated state.
Strips away the deltas from all page maps of the replicated state .
state
&mut ReplicatedState