mirror of
https://github.com/lightninglabs/loop.git
synced 2026-08-13 12:33:03 +02:00
looprpc: expose static autoloop output
Extend the public rpc surface for static autoloop integration without turning the planner on yet. SuggestSwaps responses can now carry static-address loop-in requests and the new planner reason for missing static candidates is mapped over rpc.
This commit is contained in:
parent
7cf0a87c2b
commit
e467ac932b
8 changed files with 201 additions and 110 deletions
|
|
@ -933,6 +933,10 @@ type Suggestions struct {
|
|||
// InSwaps is the set of loop in swaps that we suggest executing.
|
||||
InSwaps []loop.LoopInRequest
|
||||
|
||||
// StaticInSwaps is the set of static-address loop-ins that we suggest
|
||||
// executing.
|
||||
StaticInSwaps []loop.StaticAddressLoopInRequest
|
||||
|
||||
// DisqualifiedChans maps the set of channels that we do not recommend
|
||||
// swaps on to the reason that we did not recommend a swap.
|
||||
DisqualifiedChans map[lnwire.ShortChannelID]Reason
|
||||
|
|
|
|||
|
|
@ -73,6 +73,11 @@ const (
|
|||
// ReasonCustomChannelData indicates that the channel is not standard
|
||||
// and should not be used for swaps.
|
||||
ReasonCustomChannelData
|
||||
|
||||
// ReasonStaticLoopInNoCandidate indicates that static loop-in
|
||||
// autoloop was selected, but no full-deposit static candidate was
|
||||
// available for the target peer.
|
||||
ReasonStaticLoopInNoCandidate
|
||||
)
|
||||
|
||||
// String returns a string representation of a reason.
|
||||
|
|
@ -123,6 +128,9 @@ func (r Reason) String() string {
|
|||
case ReasonLoopInUnreachable:
|
||||
return "loop in unreachable"
|
||||
|
||||
case ReasonStaticLoopInNoCandidate:
|
||||
return "no static loop-in candidate"
|
||||
|
||||
default:
|
||||
return "unknown"
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue