mirror of
https://github.com/lightninglabs/loop.git
synced 2026-08-13 12:33:03 +02:00
loopdb: migrate loop in channel to last hop
A database field was already in place to allow channel selection for loop in. Unfortunately this field, which contains a short channel id, isn't easily usable for controlling the loop server payment. Because of non-strict forwarding, it is only possible to constrain a route to a specific last hop pubkey. This commit converts the existing field into a pubkey field.
This commit is contained in:
parent
1ebba410ea
commit
535e964ec9
12 changed files with 252 additions and 514 deletions
|
|
@ -7,6 +7,7 @@ import (
|
|||
"github.com/lightninglabs/loop/loopdb"
|
||||
"github.com/lightninglabs/loop/swap"
|
||||
"github.com/lightningnetwork/lnd/lntypes"
|
||||
"github.com/lightningnetwork/lnd/routing/route"
|
||||
)
|
||||
|
||||
// OutRequest contains the required parameters for a loop out swap.
|
||||
|
|
@ -173,9 +174,9 @@ type LoopInRequest struct {
|
|||
// client htlc tx.
|
||||
HtlcConfTarget int32
|
||||
|
||||
// LoopInChannel optionally specifies the short channel id of the
|
||||
// channel to loop in.
|
||||
LoopInChannel *uint64
|
||||
// LastHop optionally specifies the last hop to use for the loop in
|
||||
// payment.
|
||||
LastHop *route.Vertex
|
||||
|
||||
// ExternalHtlc specifies whether the htlc is published by an external
|
||||
// source.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue