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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't updatePendingTxs outside of block updates #8445

Merged
merged 2 commits into from
Apr 29, 2020

Conversation

whymarrh
Copy link
Contributor

@whymarrh whymarrh commented Apr 28, 2020

Refs #8377

This PR reverts 507397f (#5431)—the call to updatePendingTxs, in _updateMemstore in particular, caused an update to the store, resulting in a loop (further detailed in #8377). This removes the update there and switches the call in #submitPassword to a less-specific request for block updates. All updates to the pending transactions should happen in the transactions "subsystem", where we currently update pending transactions each block.

@whymarrh whymarrh force-pushed the pending-tx-checks branch from e2cd009 to 10f2b75 Compare April 28, 2020 16:54
@whymarrh whymarrh marked this pull request as ready for review April 28, 2020 18:38
@whymarrh whymarrh requested a review from a team as a code owner April 28, 2020 18:38
Copy link
Member

@Gudahtt Gudahtt left a comment

Choose a reason for hiding this comment

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

Makes sense to me!

The combination of checking each block and forcing a block update upon unlock should ensure the pending transactions are updated in a timely manner. I'm having trouble thinking of a scenario where this would skip updating a pending transaction.

Copy link
Member

@rekmarks rekmarks left a comment

Choose a reason for hiding this comment

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

Works for me.

@whymarrh whymarrh merged commit 0e54c5a into MetaMask:develop Apr 29, 2020
@whymarrh whymarrh deleted the pending-tx-checks branch April 29, 2020 18:31
Gudahtt pushed a commit that referenced this pull request Apr 30, 2020
Backport #8445 to v7.7.9. Original commit description:

* Don't updatePendingTxs outside of block updates

Refs #8377

Reverts 507397f (#5431)

* Check for new block data on unlock
Gudahtt added a commit that referenced this pull request Apr 30, 2020
…8474)

Backport #8445 to v7.7.9. Original commit description:

* Don't updatePendingTxs outside of block updates

Refs #8377

Reverts 507397f (#5431)

* Check for new block data on unlock

Co-authored-by: Whymarrh Whitby <[email protected]>
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.

4 participants