pub enum LoadedProgramType {
FailedVerification(ProgramRuntimeEnvironment),
Closed,
DelayVisibility,
Unloaded(ProgramRuntimeEnvironment),
LegacyV0(Executable<InvokeContext<'static>>),
LegacyV1(Executable<InvokeContext<'static>>),
Typed(Executable<InvokeContext<'static>>),
Builtin(BuiltinProgram<InvokeContext<'static>>),
}
Expand description
Actual payload of LoadedProgram.
Variants§
FailedVerification(ProgramRuntimeEnvironment)
Tombstone for programs which did not pass the verifier.
These can potentially come back alive if the environment changes.
Closed
Tombstone for programs which were explicitly undeployoed / closed.
DelayVisibility
Tombstone for programs which have recently been modified but the new version is not visible yet.
Unloaded(ProgramRuntimeEnvironment)
Successfully verified but not currently compiled.
It continues to track usage statistics even when the compiled executable of the program is evicted from memory.
LegacyV0(Executable<InvokeContext<'static>>)
Verified and compiled program of loader-v1 or loader-v2
LegacyV1(Executable<InvokeContext<'static>>)
Verified and compiled program of loader-v3 (aka upgradable loader)
Typed(Executable<InvokeContext<'static>>)
Verified and compiled program of loader-v4
Builtin(BuiltinProgram<InvokeContext<'static>>)
A built-in program which is not stored on-chain but backed into and distributed with the validator
Implementations§
source§impl LoadedProgramType
impl LoadedProgramType
sourcepub fn get_environment(&self) -> Option<&ProgramRuntimeEnvironment>
pub fn get_environment(&self) -> Option<&ProgramRuntimeEnvironment>
Returns a reference to its environment if it has one