Skip to content
This repository has been archived by the owner on Nov 19, 2024. It is now read-only.

Commit

Permalink
point out that stable memory is cleared during reinstall (#220)
Browse files Browse the repository at this point in the history
  • Loading branch information
mraszyk authored Aug 16, 2023
1 parent aba6c6d commit 5f65cc9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spec/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -1836,7 +1836,7 @@ Only controllers of the canister can install code.

- If `mode = install`, the canister must be empty before. This will instantiate the canister module and invoke its `canister_init` method (if present), as explained in Section "[Canister initialization](#system-api-init)", passing the `arg` to the canister.

- If `mode = reinstall`, if the canister was not empty, its existing code and state is removed before proceeding as for `mode = install`.
- If `mode = reinstall`, if the canister was not empty, its existing code and state (including stable memory) is removed before proceeding as for `mode = install`.

Note that this is different from `uninstall_code` followed by `install_code`, as `uninstall_code` generates a synthetic reject response to all callers of the uninstalled canister that the uninstalled canister did not yet reply to and ensures that callbacks to outstanding calls made by the uninstalled canister won't be executed (i.e., upon receiving a response from a downstream call made by the uninstalled canister, the cycles attached to the response are refunded, but no callbacks are executed).

Expand Down

0 comments on commit 5f65cc9

Please sign in to comment.