Skip to content

Commit

Permalink
Merge pull request MystenLabs#279 from MystenLabs/aw/publish-doc-change
Browse files Browse the repository at this point in the history
[adapter] Minor change to documentation for verify_and_link function
  • Loading branch information
awelc authored Jan 27, 2022
2 parents ada53c7 + ce7e28c commit ed4e171
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions fastx_programmability/adapter/src/adapter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,9 @@ pub fn publish<E: Debug, S: ResourceResolver<Error = E> + ModuleResolver<Error =
Ok(ExecutionStatus::Success)
}

/// Rewrite the self_id of `modules`, then verify and link the result
/// Given a list of `modules`, links each module against its
/// dependencies and runs each module with both the Move VM verifier
/// and the FastX verifier.
pub fn verify_and_link<
E: Debug,
S: ResourceResolver<Error = E> + ModuleResolver<Error = E> + Storage,
Expand All @@ -225,7 +227,7 @@ pub fn verify_and_link<
package_id: ObjectID,
natives: NativeFunctionTable,
) -> Result<(), FastPayError> {
// run the Move bytecode verifier and linker.
// Run the Move bytecode verifier and linker.
// It is important to do this before running the FastX verifier, since the fastX
// verifier may assume well-formedness conditions enforced by the Move verifier hold
let vm = MoveVM::new(natives)
Expand All @@ -251,7 +253,7 @@ pub fn verify_and_link<

// run the FastX verifier
for module in modules.iter() {
// Run FastX bytecode verifier, which runs some additional checks that assume the Move bytecode verifier has passed
// Run FastX bytecode verifier, which runs some additional checks that assume the Move bytecode verifier has passed.
verifier::verify_module(module)?;
}
Ok(())
Expand Down

0 comments on commit ed4e171

Please sign in to comment.