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

bug: reschedule rewaking when unpausing pending tx future #50

Merged
merged 1 commit into from
Jul 13, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions ethers-providers/src/pending_transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ impl<'a, P: JsonRpcClient> Future for PendingTransaction<'a, P> {
// new block has been mined
let _ready = futures_util::ready!(this.interval.poll_next_unpin(ctx));
let fut = Box::pin(this.provider.get_transaction_receipt(*this.tx_hash));
*this.state = PendingTxState::GettingReceipt(fut)
*this.state = PendingTxState::GettingReceipt(fut);
ctx.waker().wake_by_ref();
}
PendingTxState::GettingReceipt(fut) => {
if let Ok(receipt) = futures_util::ready!(fut.as_mut().poll(ctx)) {
Expand Down Expand Up @@ -102,7 +103,7 @@ impl<'a, P: JsonRpcClient> Future for PendingTransaction<'a, P> {
// we poll again
let fut = Box::pin(this.provider.get_block_number());
*this.state = PendingTxState::GettingBlockNumber(fut, receipt.clone());
return Poll::Pending;
ctx.waker().wake_by_ref();
}
PendingTxState::GettingBlockNumber(fut, receipt) => {
// Wait for the interval
Expand Down