-
Notifications
You must be signed in to change notification settings - Fork 157
Track inbound payments by PaymentId
#948
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -155,6 +155,7 @@ pub(crate) const LIQUIDITY_DISCOVERY_RETRY_MAX_DELAY: Duration = Duration::from_ | |
| /// | `route_parameters` | None | | ||
| /// | `tor_config` | None | | ||
| /// | `hrn_config` | HumanReadableNamesConfig::default() | | ||
| /// | `manually_claim_unknown_bolt11_payments` | false | | ||
| /// | ||
| /// See [`AnchorChannelsConfig`] and [`RouteParametersConfig`] for more information regarding their | ||
| /// respective default values. | ||
|
|
@@ -219,6 +220,17 @@ pub struct Config { | |
| /// | ||
| /// [BIP 353]: https://github.com/bitcoin/bips/blob/master/bip-0353.mediawiki | ||
| pub hrn_config: HumanReadableNamesConfig, | ||
| /// Whether to emit [`Event::PaymentClaimable`] for unknown BOLT 11 payments that were created | ||
| /// with a user-provided payment hash and therefore need to be manually claimed. | ||
| /// | ||
| /// If disabled, such payments are failed back without being added to the payment store. | ||
| /// | ||
| /// **Warning:** Enabling this may let any holder of a valid invoice generated by this node tie | ||
| /// up inbound HTLC slots and grow the persisted event queue until the payment is claimed, | ||
| /// failed, or times out. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it's worth highlighting that this could happen after the payment got claimed. In that case, the payment should be failed back instead of claimed twice. Perhaps even suggest that the user should keep state tracking all pending payment hashes, and fail any payment hashes not in the pending list ? |
||
| /// | ||
| /// [`Event::PaymentClaimable`]: crate::Event::PaymentClaimable | ||
| pub manually_claim_unknown_bolt11_payments: bool, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: |
||
| } | ||
|
|
||
| impl Default for Config { | ||
|
|
@@ -235,6 +247,7 @@ impl Default for Config { | |
| route_parameters: None, | ||
| node_alias: None, | ||
| hrn_config: HumanReadableNamesConfig::default(), | ||
| manually_claim_unknown_bolt11_payments: false, | ||
| } | ||
| } | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should clarify this is only true for newly created
for_hashinvoices.for_hashinvoices created prior to this commit still need to be manually claimed or failed back, regardless ofmanually_claim_unknown_bolt11_payments