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

Stuck pending swaps #363

Merged
merged 4 commits into from
Jun 15, 2018
Merged

Stuck pending swaps #363

merged 4 commits into from
Jun 15, 2018

Conversation

lukechilds
Copy link
Member

@lukechilds lukechilds commented Jun 15, 2018

Resolves #279

There is a bug in marketmaker when a swap get's some communication from a peer (like a reserved message) but never matches. In this scenario an error message is never sent so the swap is displayed as pending in the GUI forever.

This is a bit of a hack but it resolves the issue and should be fine until marketmaker v2.

It just displays swaps that are pending for more the 5 minutes as unmatched and emits a fake DB change event every minute to force a recalculation.

marketmaker issue: jl777/SuperNET#775

@lukechilds lukechilds requested a review from sindresorhus June 15, 2018 10:10

// We need to regularly check if pending swaps have timed out.
// https://github.com/jl777/SuperNET/issues/775
const ONE_MINUTE = 60000;
Copy link
Contributor

Choose a reason for hiding this comment

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

60000 => 1000 * 60 is more readable. To ensure the value is actually correct.

@sindresorhus sindresorhus merged commit 0ed0acd into master Jun 15, 2018
@sindresorhus
Copy link
Contributor

Yay! My trades view is finally cleaned up :D

@sindresorhus sindresorhus deleted the stuck-pending-swaps branch June 15, 2018 12:14
@lukechilds
Copy link
Member Author

🎉

This is also a prerequisite for a potential fix for the stuck swaps halfway through I want to try out.

kevva pushed a commit that referenced this pull request Jun 19, 2018
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.

Swap status stuck on 'Pending' for hours
2 participants