Skip to content

Commit

Permalink
review changes
Browse files Browse the repository at this point in the history
Signed-off-by: Danno Ferrin <[email protected]>
  • Loading branch information
shemnon committed Oct 4, 2023
1 parent 70ed6a0 commit 5b3f18a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ public void becomeImmutable() {
* @return true if a parent account was updated, false if not (this indicates the account should
* be inserted into the parent contact).
*/
public boolean commit() {
public boolean updateParent() {
if (parent instanceof SimpleAccount simpleAccount) {
simpleAccount.balance = balance;
simpleAccount.nonce = nonce;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@ public void revert() {
public void commit() {
accounts.forEach(
(address, account) -> {
if (!account.commit()) {
accounts.put(address, account);
if (!account.updateParent()) {
parent.accounts.put(address, account);
}
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ public OperationResult execute(final MessageFrame frame, final EVM evm) {
final boolean beneficiaryIsWarm =
frame.warmUpAddress(beneficiaryAddress) || gasCalculator().isPrecompile(beneficiaryAddress);

final Address originatorAddresss = frame.getRecipientAddress();
final MutableAccount originatorAccount = frame.getWorldUpdater().getAccount(originatorAddresss);
final Address originatorAddress = frame.getRecipientAddress();
final MutableAccount originatorAccount = frame.getWorldUpdater().getAccount(originatorAddress);
final Wei originatorBalance = originatorAccount.getBalance();

final long cost =
Expand Down

0 comments on commit 5b3f18a

Please sign in to comment.