Skip to content

Commit

Permalink
fixup: Update sui-execution lib.rs template
Browse files Browse the repository at this point in the history
  • Loading branch information
amnn committed Apr 1, 2024
1 parent b378ff2 commit e4ed633
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion scripts/execution_layer.py
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ def substitute(m):
for (version, feature, cut) in cuts
)
elif var == "VERIFIER_CUTS":
call = "Verifier::new(protocol_config, is_metered, metrics)"
call = "Verifier::new(config, metrics)"
return "\n".join(
f"{spc}{feature or version} => Box::new({cut}::{call}),"
for (version, feature, cut) in cuts
Expand Down
3 changes: 2 additions & 1 deletion sui-execution/src/lib.template.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,11 @@ pub fn executor(

pub fn verifier<'m>(
protocol_config: &ProtocolConfig,
is_metered: bool,
for_signing: bool,
metrics: &'m Arc<BytecodeVerifierMetrics>,
) -> Box<dyn Verifier + 'm> {
let version = protocol_config.execution_version_as_option().unwrap_or(0);
let config = protocol_config.verifier_config(for_signing);
match version {
// $VERIFIER_CUTS
v => panic!("Unsupported execution version {v}"),
Expand Down

0 comments on commit e4ed633

Please sign in to comment.