Skip to content

Conversation

@JssDWt
Copy link
Collaborator

@JssDWt JssDWt commented Dec 19, 2024

Ensure trampoline payments follow the following behavior:

  • When a payment with the same payment hash had already completed, return a completed response.
  • When a payment with the same payment hash is pending, return an error (ideally it should wait for payment parts to return)
  • When a payment for the same payment hash is retried, bump the group id.

Fixes Error code 201: There already is a payment with payment_hash=xxxxx, groupid=1, partid=0. Either change the partid, or wait for the payment to complete and start a new group.

Also fixes potential accidental subsequent pays to the same payment hash.

@cdecker cdecker enabled auto-merge (rebase) December 19, 2024 17:04
auto-merge was automatically disabled December 19, 2024 17:27

Head branch was pushed to by a user without write access

@JssDWt JssDWt force-pushed the jssdwt-fix-group-id branch 3 times, most recently from 5fb5b22 to a0bdae7 Compare December 19, 2024 18:22
Ensure trampoline payments follow the following behavior:
- When a payment with the same payment hash had already completed,
  return a completed response.
- When a payment with the same payment hash is pending, return an error
  (ideally it should wait for payment parts to return)
- When a payment for the same payment hash is retried, bump the group
  id.
@cdecker cdecker force-pushed the jssdwt-fix-group-id branch from a0bdae7 to d97d12a Compare December 19, 2024 18:48
@cdecker cdecker enabled auto-merge (rebase) December 19, 2024 18:48
@cdecker cdecker merged commit f178d17 into Blockstream:main Dec 19, 2024
12 checks passed
@JssDWt JssDWt deleted the jssdwt-fix-group-id branch December 19, 2024 21:37
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