MCPcopy Create free account
hub / github.com/dfinity/orbit / initialize

Function initialize

core/station/impl/src/controllers/system.rs:29–39  ·  view source on GitHub ↗
(input: Option<SystemInstall>)

Source from the content-addressed store, hash-verified

27#[cfg(any(not(feature = "canbench"), test))]
28#[ic_cdk_macros::init]
29async 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///

Callers

nothing calls this directly

Calls 3

trapFunction · 0.85
initializeMethod · 0.80

Tested by

no test coverage detected