From 8faea881c17c25a46a7b4980fdde7b073dcad812 Mon Sep 17 00:00:00 2001 From: wborgeaud Date: Thu, 18 May 2023 14:53:13 +0200 Subject: [PATCH] Don't add an event for account creation for pre-existing account (#1047) --- evm/src/cpu/kernel/asm/core/create_contract_account.asm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/evm/src/cpu/kernel/asm/core/create_contract_account.asm b/evm/src/cpu/kernel/asm/core/create_contract_account.asm index efaaff9b..905104e0 100644 --- a/evm/src/cpu/kernel/asm/core/create_contract_account.asm +++ b/evm/src/cpu/kernel/asm/core/create_contract_account.asm @@ -8,7 +8,7 @@ // stack: existing_account_ptr, address // If the account doesn't exist, there's no need to check its balance or nonce, // so we can skip ahead, setting existing_balance = existing_account_ptr = 0. - DUP1 ISZERO %jumpi(%%do_insert) + DUP1 ISZERO %jumpi(%%add_account) // stack: existing_account_ptr, address DUP1 %mload_trie_data // nonce = account[0] @@ -16,10 +16,12 @@ %jumpi(%%error_nonzero_nonce) // stack: existing_account_ptr, address %increment %mload_trie_data // balance = account[1] + %jump(%%do_insert) -%%do_insert: +%%add_account: // stack: existing_balance, address DUP2 %journal_add_account_created +%%do_insert: // stack: new_acct_value, address // Write the new account's data to MPT data, and get a pointer to it. %get_trie_data_size