Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

feature: PendingTransaction returns Option #327

Merged
merged 4 commits into from
Jul 6, 2021

Conversation

prestwich
Copy link
Collaborator

@prestwich prestwich commented Jul 3, 2021

Motivation

closes #326

Solution

  • Add 2 new states to the PendingTransaction future
  • Change the output type to Option<TransactionReceipt>
  • None is returned when the tx drops from the mempool without confirming
  • Refactor PendingTransaction internals to prevent repeated cloning of the receipt
  • Refactor code that relies on PendingTransaction to handle the None case

@prestwich prestwich added bug Something isn't working enhancement New feature or request labels Jul 3, 2021
@prestwich prestwich requested review from roynalnaruto and gakonst July 3, 2021 17:48
@prestwich
Copy link
Collaborator Author

some failing tests are related to changes in streaming tests. can someone with more context take a look?

@gakonst gakonst force-pushed the prestwich/pending-tx-drops branch from 75130a6 to 8c2ae3c Compare July 5, 2021 11:08
@gakonst gakonst merged commit d722c1a into master Jul 6, 2021
@gakonst gakonst deleted the prestwich/pending-tx-drops branch July 6, 2021 08:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PendingTransaction hangs indefinitely if the tx never confirms
2 participants