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

Commit af62f15

Browse files
rm must_create
1 parent 07ecfe0 commit af62f15

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

bus-mapping/src/circuit_input_builder/input_state_ref.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -624,7 +624,14 @@ impl<'a> CircuitInputStateRef<'a> {
624624
value_prev: sender_balance_prev,
625625
},
626626
)?;
627-
self.transfer_to(step, receiver, receiver_exists, opcode_is_create, value, true)?;
627+
self.transfer_to(
628+
step,
629+
receiver,
630+
receiver_exists,
631+
opcode_is_create,
632+
value,
633+
true,
634+
)?;
628635

629636
Ok(())
630637
}

zkevm-circuits/src/evm_circuit/execution/begin_tx.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -467,14 +467,13 @@ impl<F: Field> ExecutionGadget<F> for BeginTxGadget<F> {
467467
let callee_exists =
468468
is_precompiled(&tx.to_or_contract_addr()) || !callee_code_hash.is_zero();
469469
let caller_balance_sub_fee_pair = rws.next().account_balance_pair();
470-
let must_create = tx.is_create();
471470

472471
let caller_balance_sub_value_pair = if !tx.value.is_zero() {
473472
rws.next().account_balance_pair()
474473
} else {
475474
(zero, zero)
476475
};
477-
if !callee_exists && (!tx.value.is_zero() || must_create) {
476+
if !callee_exists && (!tx.value.is_zero() || tx.is_create()) {
478477
callee_code_hash = rws.next().account_codehash_pair().1;
479478
}
480479
let callee_balance_pair = if !tx.value.is_zero() {

0 commit comments

Comments
 (0)