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

[r2r] Use orderbook ticker to calculate swap locktimes #1548

Merged
merged 1 commit into from
Nov 18, 2022

Conversation

shamardy
Copy link
Collaborator

@shamardy shamardy commented Nov 17, 2022

Currently, only BTC and not BTC-segwit use 4x locktime, this PR fixes this situation. https://github.com/KomodoPlatform/atomicDEX-API/blob/7909eb1301a42007f9a7dc6bfb782ba3fe176ec0/mm2src/mm2_main/src/lp_swap.rs#L559-L569
Note: This breaks backward compatibility, since locktimes are exchanged and validated in the negotiation messages. Old nodes will not be able to swap BTC segwit with new nodes after this update.

@shamardy shamardy changed the title [wip] Use orderbook ticker to calculate swap locktimes [r2r] Use orderbook ticker to calculate swap locktimes Nov 17, 2022
@cipig
Copy link
Member

cipig commented Nov 17, 2022

Note: This breaks backward compatibility, since locktimes are exchanged and validated in the negotiation messages. Old nodes will not be able to swap BTC segwit with new nodes after this update.

Is only BTC-segwit affected or BTC too?

@shamardy
Copy link
Collaborator Author

Is only BTC-segwit affected or BTC too?

only BTC-segwit whether it's the maker's or the taker's coin.

Copy link
Member

@artemii235 artemii235 left a comment

Choose a reason for hiding this comment

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

Thanks for finding this bug and fast fix!

@artemii235 artemii235 merged commit 3c08e14 into dev Nov 18, 2022
@artemii235 artemii235 deleted the orderbook-ticker-locktime branch November 18, 2022 10:19
@shamardy shamardy mentioned this pull request Feb 17, 2023
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.

3 participants