Closed kselveliev closed 2 months ago
Attention: Patch coverage is 85.71429%
with 3 lines
in your changes missing coverage. Please review.
Project coverage is 92.51%. Comparing base (
d2f7848
) to head (05a3106
). Report is 15 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
Description: This PR aims to fix null error when a contract call is made with value and evm address as a sender. Where the evm address is not existing.
Couple of scenarios:
Currently when an empty from is passed. We are creating an Account.getDummySenderAccount(). that does not have alias
If the from is a not existing long zero address We are creating an Account.getDummySenderAccount(long zero address) from it without alias.
In the cases where evm address alias was passed as a from parameter. We were still creating a dummy account without alias. And subsequent account retrievals by alias were returning null causing the error since we did not create the account with that alias.
This pr adds a check. Check if the from is an evm canonical address. Create the dummy account with that alias. Otherwise create the dummy account as before without alias.
This PR modifies:
MirrorEvmTxProcessorImpl
- add a check to see is the from address is not existing and also a canonical evm address and it it is creates the dummy account with that alias.Account
.java - created new methods that creates dummy account with and aliasMirrorEvmTxProcessorTest
- adds a test case for the error scenario.ContractCallServiceTest
- adds a test case for the error scenario.Related issue(s):
Fixes #9301
Notes for reviewer:
Checklist