[go: nahoru, domu]

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] Lightning Swaps Locktimes + Lightning Maker Swap #1557

Merged
merged 22 commits into from
Dec 8, 2022

Conversation

shamardy
Copy link
Collaborator
@shamardy shamardy commented Nov 25, 2022

#1045

@shamardy shamardy changed the title Lightning Swaps Locktimes + Lightning Maker wap [wip] Lightning Swaps Locktimes + Lightning Maker Swap Nov 25, 2022
@shamardy shamardy changed the title [wip] Lightning Swaps Locktimes + Lightning Maker Swap [r2r] Lightning Swaps Locktimes + Lightning Maker Swap Nov 25, 2022
Copy link
@sergeyboyko0791 sergeyboyko0791 left a comment

Choose a reason for hiding this comment

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

Awesome as usual!
I have mostly questions due to the algorithm complexity

mm2src/coins/lightning.rs Show resolved Hide resolved
mm2src/coins/lightning.rs Outdated Show resolved Hide resolved
mm2src/coins/lightning.rs Outdated Show resolved Hide resolved
mm2src/coins/lightning.rs Show resolved Hide resolved
mm2src/coins/lightning.rs Outdated Show resolved Hide resolved
mm2src/coins/lightning.rs Outdated Show resolved Hide resolved
mm2src/coins/lightning.rs Outdated Show resolved Hide resolved
mm2src/coins/lightning/ln_events.rs Outdated Show resolved Hide resolved
mm2src/coins/lightning/ln_events.rs Outdated Show resolved Hide resolved
mm2src/mm2_main/src/lp_swap/maker_swap.rs Show resolved Hide resolved
@shamardy shamardy changed the title [r2r] Lightning Swaps Locktimes + Lightning Maker Swap [wip] Lightning Swaps Locktimes + Lightning Maker Swap Nov 29, 2022
@shamardy shamardy changed the title [wip] Lightning Swaps Locktimes + Lightning Maker Swap [r2r] Lightning Swaps Locktimes + Lightning Maker Swap Nov 29, 2022
sergeyboyko0791
sergeyboyko0791 previously approved these changes Dec 4, 2022
Copy link
@sergeyboyko0791 sergeyboyko0791 left a comment

Choose a reason for hiding this comment

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

LGTM, thank you!

caglaryucekaya
caglaryucekaya previously approved these changes Dec 6, 2022
Copy link
@caglaryucekaya caglaryucekaya left a comment

Choose a reason for hiding this comment

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

Great work 🔥 I only have a few minor notes and some questions

mm2src/mm2_main/tests/mm2_tests/lightning_tests.rs Outdated Show resolved Hide resolved
mm2src/coins/lightning.rs Show resolved Hide resolved
mm2src/mm2_main/tests/mm2_tests/lightning_tests.rs Outdated Show resolved Hide resolved
Ok(())
},
Ok(None) => MmError::err(ValidatePaymentError::UnexpectedPaymentState(format!(
"Payment {} should be found on the database",

Choose a reason for hiding this comment

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

How about "Payment {} could not be found on the database"

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Because the error variant is UnexpectedPaymentState, I wanted to highlight the expected state in the error message. At this stage (validating a swap payment), the payment info should be in the database. I can modify the message to be

"Payment {} is not in the database when it should be"

What do you think?

mm2src/coins/lightning.rs Outdated Show resolved Hide resolved
mm2src/coins/lightning/ln_events.rs Show resolved Hide resolved
mm2src/coins/lightning/ln_utils.rs Show resolved Hide resolved
@shamardy shamardy changed the title [r2r] Lightning Swaps Locktimes + Lightning Maker Swap [wip] Lightning Swaps Locktimes + Lightning Maker Swap Dec 7, 2022
@shamardy shamardy changed the title [wip] Lightning Swaps Locktimes + Lightning Maker Swap [r2r] Lightning Swaps Locktimes + Lightning Maker Swap Dec 7, 2022
Copy link
@sergeyboyko0791 sergeyboyko0791 left a comment

Choose a reason for hiding this comment

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

Re-approve

@sergeyboyko0791 sergeyboyko0791 merged commit c88ac74 into dev Dec 8, 2022
@sergeyboyko0791 sergeyboyko0791 deleted the ln-locktime branch December 8, 2022 12:09
@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