@@ -3822,6 +3822,17 @@ Env = {
3822
3822
}
3823
3823
Mod.init(A.canister_id, A.arg, M.caller, Env) = Return {new_state = New_state; new_certified_data = New_certified_data; new_global_timer = New_global_timer; cycles_used = Cycles_used;}
3824
3824
3825
+ freezing_limit(
3826
+ S.compute_allocation[A.canister_id],
3827
+ S.memory_allocation[A.canister_id],
3828
+ S.freezing_threshold[A.canister_id],
3829
+ memory_usage(
3830
+ S.canisters[A.canister_id].wasm_state,
3831
+ S.canisters[A.canister_id].raw_module,
3832
+ S.canister_history[A.canister_id],
3833
+ ),
3834
+ S.canister_subnet[A.canister_id].subnet_size,
3835
+ ) + MAX_CYCLES_PER_MESSAGE ≤ S.balances[A.canister_id]
3825
3836
freezing_limit(
3826
3837
S.compute_allocation[A.canister_id],
3827
3838
S.memory_allocation[A.canister_id],
@@ -3941,6 +3952,28 @@ Env2 = Env with {
3941
3952
}
3942
3953
Mod.post_upgrade(A.canister_id, Stable_memory, A.arg, M.caller, Env2) = Return {new_state = New_state; new_certified_data = New_certified_data'; new_global_timer = New_global_timer; cycles_used = Cycles_used';}
3943
3954
3955
+ freezing_limit(
3956
+ S.compute_allocation[A.canister_id],
3957
+ S.memory_allocation[A.canister_id],
3958
+ S.freezing_threshold[A.canister_id],
3959
+ memory_usage(
3960
+ S.canisters[A.canister_id].wasm_state,
3961
+ S.canisters[A.canister_id].raw_module,
3962
+ S.canister_history[A.canister_id],
3963
+ ),
3964
+ S.canister_subnet[A.canister_id].subnet_size,
3965
+ ) + MAX_CYCLES_PER_MESSAGE ≤ S.balances[A.canister_id]
3966
+ freezing_limit(
3967
+ S.compute_allocation[A.canister_id],
3968
+ S.memory_allocation[A.canister_id],
3969
+ S.freezing_threshold[A.canister_id],
3970
+ memory_usage(
3971
+ New_state,
3972
+ A.wasm_module,
3973
+ New_canister_history
3974
+ ),
3975
+ S.canister_subnet[A.canister_id].subnet_size,
3976
+ ) + MAX_CYCLES_PER_MESSAGE ≤ S.balances[A.canister_id]
3944
3977
freezing_limit(
3945
3978
S.compute_allocation[A.canister_id],
3946
3979
S.memory_allocation[A.canister_id],
0 commit comments