(input: Option<SystemInstall>)
| 27 | #[cfg(any(not(feature = "canbench"), test))] |
| 28 | #[ic_cdk_macros::init] |
| 29 | async fn initialize(input: Option<SystemInstall>) { |
| 30 | INITIALIZING.with_borrow_mut(|initializing| { |
| 31 | *initializing = true; |
| 32 | }); |
| 33 | |
| 34 | set_certified_data_for_skip_certification(); |
| 35 | match input { |
| 36 | Some(SystemInstall::Init(input)) => CONTROLLER.initialize(*input).await, |
| 37 | Some(SystemInstall::Upgrade(_)) | None => trap("Invalid args to initialize canister"), |
| 38 | } |
| 39 | } |
| 40 | |
| 41 | /// The init is overriden for benchmarking purposes. |
| 42 | /// |
nothing calls this directly
no test coverage detected