Skip to content

Commit

Permalink
Fix hook 7 for benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
Julian Ventura committed Aug 20, 2024
1 parent 44337c5 commit b09ee3a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions core/lib/multivm/src/versions/era_vm/hook.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
#[derive(Debug)]
pub(crate) enum Hook {
AccountValidationEntered,
PaymasterValidationEntered,
AccountValidationExited,
ValidationStepEnded,
TxHasEnded,
DebugLog,
DebugReturnData,
NearCallCatch,
AskOperatorForRefund,
NotifyAboutRefund,
PostResult,
FinalBatchInfo,
PubdataRequested,
}

impl Hook {
Expand All @@ -18,15 +21,18 @@ impl Hook {
pub fn from_u32(hook: u32) -> Self {
match hook {
0 => Hook::AccountValidationEntered,
1 => Hook::PaymasterValidationEntered,
2 => Hook::AccountValidationExited,
3 => Hook::ValidationStepEnded,
4 => Hook::TxHasEnded,
5 => Hook::DebugLog,
6 => Hook::DebugReturnData,
7 => Hook::NearCallCatch,
8 => Hook::AskOperatorForRefund,
9 => Hook::NotifyAboutRefund,
10 => Hook::PostResult,
11 => Hook::FinalBatchInfo,
12 => Hook::PubdataRequested,
_ => panic!("Unknown hook {}", hook),
}
}
Expand Down
3 changes: 3 additions & 0 deletions core/lib/multivm/src/versions/era_vm/vm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,9 @@ impl<S: ReadStorage + 'static> Vm<S> {
Hook::AccountValidationEntered => {
// println!("ACCOUNT VALIDATION ENTERED");
}
Hook::NearCallCatch => {}
Hook::PaymasterValidationEntered => {}
Hook::PubdataRequested => {}
Hook::ValidationStepEnded => {
// println!("VALIDATION STEP ENDED");
}
Expand Down

0 comments on commit b09ee3a

Please sign in to comment.