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 submit failed transactions to the mempool #64

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

DaMatrix
Copy link
Contributor

Description

this prevents a SendNextPayment request from being made if make_payment() fails, thereby avoiding a panic in send_next_payment_to_destinations().

Changelog

  • List the changes to the codebase that this PR introduces

Type of Change

Please mark the appropriate option by putting an "x" inside the brackets:

  • Bug fix
  • New feature
  • Enhancement or optimization
  • Documentation update
  • Other (please specify)

Checklist

Put an "x" in the boxes that apply. If you're unsure about any of these, don't hesitate to ask. We're here to help!

  • I have tested the changes locally and they work as expected.
  • I have added necessary documentation or updated existing documentation.
  • My code follows the project's coding standards and style guidelines.
  • I have added/updated relevant tests to ensure the changes are properly covered.
  • I have checked for and resolved any merge conflicts.
  • My commits have clear and descriptive messages.

Screenshots (if applicable)

If the changes affect the UI or have visual effects, please provide screenshots or GIFs showcasing the changes.

Additional Context (if applicable)

Add any additional context or information about the changes that may be helpful in understanding the pull request.

Related Issues (if applicable)

If this pull request is related to any existing issues, please list them here.

Requested Reviewers

Mention any specific individuals or teams you would like to request a review from.

this prevents a SendNextPayment request from being made if make_payment() fails, thereby avoiding a panic in send_next_payment_to_destinations().
@DaMatrix DaMatrix requested a review from a team as a code owner May 11, 2024 19:07
@@ -852,6 +852,8 @@ impl UserNode {
&mut self,
mempool_peer: SocketAddr,
) -> Result<()> {
// TODO: having next_payment as part of the node is error-prone, it would be better to
Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, this was a last minute change made to accommodate an exchange, and still uses this weird async construction and sending structure. Would you like to make this change as part of this MR @DaMatrix?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, will do

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.

2 participants