Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: initial delay in PendingTransaction #339

Merged
merged 4 commits into from Jul 13, 2021

Conversation

prestwich
Copy link
Collaborator

Motivation

#327 introduced a bug. When the tx has just been broadcast, it may not be available over the eth_getTransactionByHash rpc call. This results in the PendingTransaction exiting immediately with an incorrect dropped message

Solution

I added an initial 5 second delay to the PendingTransaction loop. I don't like this solution, but it is hard to see a better one 馃

@prestwich prestwich added the bug Something isn't working label Jul 12, 2021
@prestwich prestwich requested a review from gakonst July 12, 2021 22:07
@prestwich prestwich marked this pull request as draft July 12, 2021 22:23
@prestwich
Copy link
Collaborator Author

prestwich commented Jul 12, 2021

so I believe the code is correct, but observing behaviort in the wild, the Delay future is firing immediately 馃

@prestwich
Copy link
Collaborator Author

prestwich commented Jul 12, 2021

nvm am dumb, was misreading seconds as milliseconds lmao

@prestwich prestwich marked this pull request as ready for review July 13, 2021 15:24
@gakonst gakonst merged commit d31d19c into master Jul 13, 2021
@gakonst gakonst deleted the prestwich/pending-initial-delay branch July 13, 2021 19:34
meetmangukiya pushed a commit to meetmangukiya/ethers-rs that referenced this pull request Mar 21, 2022
* update README with console.log details

I found this useful, and figured it might be useful for others, so I gave it a quick writeup

* Apply suggestions from code review

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants