Skip to content

Commit

Permalink
fix: remove unnecessary match (privacy-scaling-explorations#1561)
Browse files Browse the repository at this point in the history
### Description

We don't need to match `OpcodeId::PUSH32` again, because it has been
contained in previous code.

https://github.com/privacy-scaling-explorations/zkevm-circuits/blob/b36da2a4047f8811990c6d928bb1e1864f88328b/zkevm-circuits/src/evm_circuit/step.rs#L215-L216

https://github.com/privacy-scaling-explorations/zkevm-circuits/blob/b36da2a4047f8811990c6d928bb1e1864f88328b/eth-types/src/evm_types/opcode_ids.rs#L319-L321

The `is_push` contains the `PUSH32` opcode. So, let's remove the
duplicate match.

### Issue Link

No

### Type of change

- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] This change requires a documentation update
  • Loading branch information
dyxushuai authored Aug 23, 2023
1 parent 5d01150 commit f30b7eb
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion zkevm-circuits/src/evm_circuit/step.rs
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,6 @@ impl From<&ExecStep> for ExecutionState {
OpcodeId::NOT => ExecutionState::NOT,
OpcodeId::EXP => ExecutionState::EXP,
OpcodeId::POP => ExecutionState::POP,
OpcodeId::PUSH32 => ExecutionState::PUSH,
OpcodeId::BYTE => ExecutionState::BYTE,
OpcodeId::MLOAD => ExecutionState::MEMORY,
OpcodeId::MSTORE => ExecutionState::MEMORY,
Expand Down

0 comments on commit f30b7eb

Please sign in to comment.