Skip to content

Commit

Permalink
adjust mocks
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 5a787bc commit d90c7e1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
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 originatorAddress = frame.getRecipientAddress();
final MutableAccount originatorAccount = frame.getWorldUpdater().getAccount(originatorAddress);
final Address originatorAddresss = frame.getRecipientAddress();
final MutableAccount originatorAccount = frame.getWorldUpdater().getAccount(originatorAddresss);
final Wei originatorBalance = originatorAccount.getBalance();

final long cost =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,11 @@ void checkContractDeletionCommon(
}

when(worldUpdater.getAccount(originatorAddress)).thenReturn(accountOriginator);
when(worldUpdater.get(originatorAddress)).thenReturn(accountOriginator);
if (!originatorAddress.equals(beneficiaryAddress)) {
when(worldUpdater.get(beneficiaryAddress)).thenReturn(accountBeneficiary);
}
when(worldUpdater.getOrCreate(beneficiaryAddress)).thenReturn(accountBeneficiary);
when(accountOriginator.getAddress()).thenReturn(originatorAddress);
when(accountOriginator.getBalance()).thenReturn(Wei.fromHexString(balanceHex));

final Operation.OperationResult operationResult = operation.execute(messageFrame, evm);
Expand Down

0 comments on commit d90c7e1

Please sign in to comment.