MCPcopy Create free account
hub / github.com/diem/move / verify_module

Method verify_module

language/move-binary-format/src/check_bounds.rs:66–77  ·  view source on GitHub ↗
(module: &'a CompiledModule)

Source from the content-addressed store, hash-verified

64 }
65
66 pub fn verify_module(module: &'a CompiledModule) -> PartialVMResult<()> {
67 let mut bounds_check = Self {
68 view: BinaryIndexedView::Module(module),
69 context: BoundsCheckingContext::Module,
70 };
71 if bounds_check.view.module_handles().is_empty() {
72 let status =
73 verification_error(StatusCode::NO_MODULE_HANDLES, IndexKind::ModuleHandle, 0);
74 return Err(status);
75 }
76 bounds_check.verify_impl()
77 }
78
79 fn verify_impl(&mut self) -> PartialVMResult<()> {
80 self.check_signatures()?;

Callers

nothing calls this directly

Calls 5

verification_errorFunction · 0.85
verify_implMethod · 0.80
ModuleClass · 0.70
is_emptyMethod · 0.45
module_handlesMethod · 0.45

Tested by

no test coverage detected