Skip to content

Commit

Permalink
Keep track of inflight HTLCs across payments
Browse files Browse the repository at this point in the history
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
jurvis committed Aug 26, 2022
1 parent b837fd4 commit 033028b
Show file tree
Hide file tree
Showing 4 changed files with 507 additions and 58 deletions.
Loading

0 comments on commit 033028b

Please sign in to comment.