Valentine Wallace
d776dee3a5
Retry HTLCs in process_pending_htlc_forwards
2023-01-25 14:44:07 -05:00
Valentine Wallace
72a7da8d51
Remove AllPathsFailed outbounds at send_payment_internal callsites instead
...
This makes it easier to retry payments if all paths fail on initial send, in
in which case we'll want to hold off on removing the pending payment
2023-01-25 14:44:07 -05:00
Valentine Wallace
686ef08316
Generate PendingHTLCsForwardable upon retryable payment
2023-01-25 14:44:07 -05:00
Valentine Wallace
6351a99935
Decode onion fail outside of outbound_payments lock
...
It's not ideal to do all this computation while the lock is held. We also want
to decode the failure *before* taking the lock, so we can store the failed scid
in the relevant outbound for retry in the next commit(s).
2023-01-25 14:44:07 -05:00
Valentine Wallace
c0a22f7174
Store retry data in PendingOutboundPayment::Retryable
...
Used in upcoming commit(s) to automatically retry HTLCs in ChannelManager
2023-01-25 14:44:03 -05:00
Valentine Wallace
ae34533932
Parameterize add_new_pending_payment with retry strategy and route params
2023-01-24 14:12:04 -05:00
Valentine Wallace
cbb75e27b2
Copy Retry from invoice module to outbound_payment module
...
Also configure it such that in std tests, it will use SinceEpoch instead of
Instant so time can be manually advanced.
2023-01-24 14:11:59 -05:00
Valentine Wallace
948ebc67f0
Copy PaymentAttempts from invoice module to outbound_payment module
2023-01-23 15:12:09 -05:00
Matt Corallo
ce6bcf68a1
Merge pull request #1950 from tnull/2023-01-fix-doc-warnings-and-nits
...
Fix doc warnings and doc cleanup in `msgs.rs`/`ser.rs`
2023-01-15 07:03:14 +00:00
Elias Rohrer
defa2f6811
Fix misc. warnings from --document-private-items
2023-01-13 18:26:09 -06:00
Arik Sosman
72183bd932
Split up generic parameters that used to comprise KeysInterface.
2023-01-12 16:10:35 -08:00
Arik Sosman
5824e226ca
Remove KeysInterface trait.
2023-01-12 09:18:08 -08:00
Valentine Wallace
cc60fd601f
outbound_payment: put method signature closing paren on next line
...
in long method signatures
2022-12-21 16:26:55 -05:00
Valentine Wallace
60492d769a
Fix cfg(test) indentation
2022-12-20 21:23:54 -05:00
Valentine Wallace
8d5f7c87cb
Make add_new_pending_payment private to module
...
And expose it in testing only, for safety
2022-12-20 21:23:54 -05:00
Valentine Wallace
1ded1d21bd
Fix main build
2022-12-20 17:55:06 -05:00
Valentine Wallace
afdaa64b44
Rename send_payment and retry_payment for retries
...
Once ChannelManager supports payment retries, it will make more sense for its
current send_payment method to be named send_payment_with_route because
retrying should be the default. Here we get a head start on this by making the
rename in outbound_payment, but not changing the public interface yet.
2022-12-19 21:08:08 -05:00
Valentine Wallace
3e89cc7e08
Reduce visibility of outbound payment methods
2022-12-19 21:08:08 -05:00
Valentine Wallace
ec55730959
Start parameters on a newline if they don't fit
...
Separating out this commit to keep the main refactor move-only
2022-12-19 21:08:03 -05:00
Valentine Wallace
e69a4c2636
Remove unnecessary mut in finalize_claims
2022-12-19 21:04:58 -05:00
Valentine Wallace
afd31507d9
Swap pending_outbound_payments for OutboundPayments struct
...
This allows us to move a lot of outbound payment logic out of ChannelManager
and into the new outbound_payment module, and helps avoid growing
ChannelManager when we add retry logic to it in upcoming work.
2022-12-19 21:04:53 -05:00
Valentine Wallace
278ebd208a
Move PaymentSendFailure into outbound_payment module
...
And re-export it in channelmanager.rs so it can remain public
2022-12-19 14:10:03 -05:00
Valentine Wallace
070832643f
Move PendingOutboundPayment to new outbound_payment module
...
We want to move all outbound payment-related things to this new module, to help
break up ChannelManager so future payment retries work doesn't increase the
size of ChannelManager.
2022-12-19 14:09:59 -05:00