Add `source` and `target` fn's to `CandidateRouteHop`
authorjbesraa <jbesraa@gmail.com>
Sat, 26 Aug 2023 15:06:45 +0000 (18:06 +0300)
committerjbesraa <jbesraa@gmail.com>
Tue, 5 Dec 2023 19:07:46 +0000 (21:07 +0200)
commita1d15ac1926f70aa5ab4f6686fe12fb18383bb3b
treea69747185f596651b4ee3794702cceb196f2a55d
parent366d68808734bab379072e2a069bd72da51f4421
Add `source` and `target` fn's to `CandidateRouteHop`

    We add `CandidateRouteHop::source` and
    `CandidateRouteHop::source` functions to point
    to current and next hops in route respectively.
    As we have now `source` and `target`
    available in `CandidateRouteHop` we also
    remove `CandidateRouteHop::id` inputs
    so now they are consumed from `self.target`
    and `self.source` functions.
    In the `add_entry` macro we also remove `source`
    and `target` arguments in favor of `candidate`
    of type `CandidateRouteHop` that holds the
    needed info.
lightning/src/routing/router.rs