Skip to content

Conversation

@Lagrang3
Copy link
Collaborator

Xpay gets the block height from the block_added notification.
In certain situations, the backend may be out of sync and in that case payment attempts will fail with
incorrect_or_unknown_payment_details if we are too far in the past.
A possible solution is to use the headercount as the correct block height.
There is no notification that we can use to fetch headercount, so we add as an alternative an additional
RPC call to getchaininfo at the start of the payment to update our internal block height.

Addresses issue #8612.
It uses a similar approach to #7190.

  • The changelog has been updated in the relevant commit(s) according to the guidelines.
  • Tests have been added or modified to reflect the changes.
  • Documentation has been reviewed and updated as needed.
  • Related issues have been listed and linked, including any that this PR closes.

Changelog-Fixed: xpay: use header count instead of block count in the payment's reference block height.

Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
Changelog-None

Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
@madelinevibes madelinevibes added this to the v26.03 milestone Dec 8, 2025
@Lagrang3
Copy link
Collaborator Author

Lagrang3 commented Dec 8, 2025

This is obsolete since it has been addressed in PR #8645.

@Lagrang3 Lagrang3 closed this Dec 8, 2025
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