-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstructs.go
42 lines (36 loc) · 1.04 KB
/
structs.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package main
import (
context "context"
"github.com/Elenpay/liquidator/nodeguard"
"github.com/Elenpay/liquidator/provider"
"github.com/lightninglabs/loop/looprpc"
"github.com/lightningnetwork/lnd/lnrpc"
)
type BaseInfo struct {
nodeHost string
nodeInfo lnrpc.GetInfoResponse
nodeMacaroon string
loopdMacaroon string
lightningClients map[string]lnrpc.LightningClient
nodeguardClient nodeguard.NodeGuardServiceClient
swapClient looprpc.SwapClientClient
// nodeCtxs is a map of contexts for each node, the context has the macaroon attached
nodeCtxs map[string]context.Context
provider provider.Provider
}
type MonitorChannelsInfo struct {
BaseInfo
}
type MonitorChannelInfo struct {
BaseInfo
channel *lnrpc.Channel
context context.Context
liquidationRules map[uint64][]nodeguard.LiquidityRule
}
type ManageChannelLiquidityInfo struct {
BaseInfo
channel *lnrpc.Channel
channelBalanceRatio float64
channelRules *[]nodeguard.LiquidityRule
ctx context.Context
}