-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix flaky E2E test for EVM state building #532
Conversation
WalkthroughThe pull request modifies the Changes
Possibly related PRs
Suggested labels
Poem
Tip New featuresWalkthrough comment now includes:
Notes:
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
@@ -41,7 +41,10 @@ it('should handle a large number of EVM interactions', async () => { | |||
let senderBalance = await web3.eth.getBalance(conf.eoa.address) | |||
assert.equal(senderBalance, 1999999999937000000n) | |||
|
|||
let transferAmounts = ['0.01', '0.03', '0.05'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When the transfer amount 0.05
was randomly selected 3 times, it would cause the test to fail, as the EOA only has 0.15
ether.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- tests/web3js/build_evm_state_test.js (1 hunks)
Additional comments not posted (1)
tests/web3js/build_evm_state_test.js (1)
44-47
: Well-implemented change to prevent transaction reversion.The modification to the
transferAmounts
array ensures that the total transfer amount does not reach the critical threshold of0.15 ether
, which is the balance of each EOA. This change effectively prevents transaction reversion due to insufficient funds after the transfer. The added comments provide clear guidance on the rationale behind these amounts, enhancing the readability and maintainability of the test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
noticed that yes
Description
The random values for the transfer amount, cannot be equal to
0.15
ether, as that is the balance of the test EOAs, and it will cause the transfer transaction to be reverted.For contributor use:
master
branchFiles changed
in the Github PR explorerSummary by CodeRabbit
Bug Fixes
Tests