Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
channeldb+rpcserver: expose legacy payments as multi-path payments #3499
Builds on #3442
This PR extends the
In the future we will perform a migration to convert the legacy on-disk format into real MPP payments on disk, but this allows us to fleshing out the API before the internal work is completed.
Nice, I really like the limited scope of this PR! Makes it easy to review, and it is a great first step :)
Gave it a high level look, looks more or less good to me, but will need to see it in tandem with upcoming MPP PRs to make sure things fit
Last few commits now add the HTLC attempts to
I rebased everything over #3442, which also allowed me test that the MPP record is being set properly in the new sendtoroute itests. This actually pointed out a bug in the test where we would send before receiving the node ann, causing us to downgrade to legacy payments for some of the htlcs. That bug has been fixed in #3442, and here we extend the itest with additional checks on the listpayments rpc.
Preliminary step to exposing PaymentPreimage() as a method that can be shared between legacy payments and mutli-path payments.
This commit modifies the FetchPayment method to return MPPayment structs converted from the legacy on-disk format. This allows us to attach the HTLCs to the events given to clients subscribing to the outcome of an HTLC. This commit also bubbles up to the routerrpc/router_server, by populating HTLCAttempts in the response and extracting the legacy route field from the HTLCAttempts.