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

Add polling interval to pending transactions #31

Merged
merged 1 commit into from
Jun 21, 2020

Conversation

gakonst
Copy link
Owner

@gakonst gakonst commented Jun 21, 2020

Motivation

Previously, the PendingTransaction struct would spam the chain with calls to get the transaction receipt and the block number, as instructed by the runtime. Similarly to how Filter streams are implemented, the async runtime should not poll more frequently than the block time.

Solution

We add an interval parameter which makes the future sleep until the interval has passed.

@gakonst gakonst merged commit 9a0c972 into master Jun 21, 2020
@gakonst gakonst deleted the feature/pending-txs-interval branch June 21, 2020 08:09
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant