Skip to content

Conversation

@keroro520
Copy link
Contributor

@keroro520 keroro520 commented Oct 16, 2023

Case TestEthClient/TxInBlockInterrupted checks whether the interface eth_getTransactionByBlockHashAndIndex works correctly with a canceled context. Therefore, it passes a cancelled context to the interface and expects a nil transaction is returned.

However, as the close of the Done channel may happen asynchronously after the cancel function returns, this test case may occasionally return a non-nil transaction.

This PR adds <-ctx.Done() to ensure the close of the Done channel.


The test case has failed several times on free GitHub Actions CI runners.

@keroro520 keroro520 force-pushed the test-ensure-close-of-context branch from 8db5361 to 069da10 Compare October 16, 2023 07:38
Copy link
Contributor

@holiman holiman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@holiman holiman modified the milestones: 1.13.4, 1.13.5 Oct 17, 2023
@holiman holiman merged commit 1f11d2d into ethereum:master Oct 17, 2023
devopsbo3 pushed a commit to HorizenOfficial/go-ethereum that referenced this pull request Nov 10, 2023
devopsbo3 added a commit to HorizenOfficial/go-ethereum that referenced this pull request Nov 10, 2023
devopsbo3 added a commit to HorizenOfficial/go-ethereum that referenced this pull request Nov 10, 2023
Dergarcon pushed a commit to MetaMask/mev-geth-0x2mev that referenced this pull request Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants