Skip to content

xpay: hold payments until its init replies are in - #78

Merged
kwsantiago merged 1 commit into
blake2b-unifiedfrom
xpay-startup
Oct 30, 2026
Merged

kwsantiago merged 1 commit into
blake2b-unifiedfrom
xpay-startup

Conversation

@kwsantiago

Copy link
Copy Markdown

xpay sends getchaininfo, getinfo and askrene-create-layer at init without waiting for the replies, so a payment can arrive before them. A payment before the getinfo reply used an uninitialized local_id and aborted xpay in secp256k1_ec_pubkey_serialize. A payment before the layer existed failed askrene-age with "Unknown layer", which also killed the plugin.

xpay, xpay-as-pay, sendamount, xkeysend and pay taken over through the rpc_command hook are now held until all three replies are in, then run as usual. The tests hold each reply from a test plugin, and both crashed xpay before this change.

Closes #14

Changelog-None

@kwsantiago
kwsantiago merged commit 4a5abea into blake2b-unified Oct 30, 2026
89 of 91 checks passed
@kwsantiago
kwsantiago deleted the xpay-startup branch October 30, 2026 20:19
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.

xpay: local_id is read before getinfo replies at startup

1 participant