Skip to content
This repository has been archived by the owner on Jul 5, 2024. It is now read-only.

Commit

Permalink
rm must_create
Browse files Browse the repository at this point in the history
  • Loading branch information
ChihChengLiang committed Feb 22, 2024
1 parent 07ecfe0 commit 42c3aa0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions zkevm-circuits/src/evm_circuit/execution/begin_tx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -467,14 +467,13 @@ impl<F: Field> ExecutionGadget<F> for BeginTxGadget<F> {
let callee_exists =
is_precompiled(&tx.to_or_contract_addr()) || !callee_code_hash.is_zero();
let caller_balance_sub_fee_pair = rws.next().account_balance_pair();
let must_create = tx.is_create();

let caller_balance_sub_value_pair = if !tx.value.is_zero() {
rws.next().account_balance_pair()
} else {
(zero, zero)
};
if !callee_exists && (!tx.value.is_zero() || must_create) {
if !callee_exists && (!tx.value.is_zero() || tx.is_create()) {
callee_code_hash = rws.next().account_codehash_pair().1;
}
let callee_balance_pair = if !tx.value.is_zero() {
Expand Down

0 comments on commit 42c3aa0

Please sign in to comment.