Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Keep track of inflight HTLCs across payments
Added two methods, `process_path_inflight_htlcs` and `remove_path_inflight_htlcs`, that updates that `payment_cache` map with path information that may have failed, succeeded, or have been given up on. Introduced `AccountForInflightHtlcs`, which will wrap our user-provided scorer. We move the `S:Score` type parameterization from the `Router` to `find_route`, so we can use our newly introduced `AccountForInflightHtlcs`. `AccountForInflightHtlcs` keeps track of a map of inflight HTLCs by their short channel id, direction, and give us the value that is being used up. This map will in turn be populated prior to calling `find_route`, where we’ll use `create_inflight_map`, to generate a current map of all inflight HTLCs based on what was stored in `payment_cache`.
- Loading branch information