rpcserver+routerrpc: add subscribe events to router backend
Add SubscribeHtlcEvents to RouterBackend in preparation for the addition of a HtlcNotifier stream.
This commit is contained in:
parent
4cb518c174
commit
67d4bad73f
@ -20,6 +20,7 @@ import (
|
||||
"github.com/lightningnetwork/lnd/record"
|
||||
"github.com/lightningnetwork/lnd/routing"
|
||||
"github.com/lightningnetwork/lnd/routing/route"
|
||||
"github.com/lightningnetwork/lnd/subscribe"
|
||||
"github.com/lightningnetwork/lnd/zpay32"
|
||||
)
|
||||
|
||||
@ -68,6 +69,10 @@ type RouterBackend struct {
|
||||
// DefaultFinalCltvDelta is the default value used as final cltv delta
|
||||
// when an RPC caller doesn't specify a value.
|
||||
DefaultFinalCltvDelta uint16
|
||||
|
||||
// SubscribeHtlcEvents returns a subscription client for the node's
|
||||
// htlc events.
|
||||
SubscribeHtlcEvents func() (*subscribe.Client, error)
|
||||
}
|
||||
|
||||
// MissionControl defines the mission control dependencies of routerrpc.
|
||||
|
@ -567,6 +567,7 @@ func newRPCServer(s *server, macService *macaroons.Service,
|
||||
Tower: s.controlTower,
|
||||
MaxTotalTimelock: cfg.MaxOutgoingCltvExpiry,
|
||||
DefaultFinalCltvDelta: uint16(cfg.Bitcoin.TimeLockDelta),
|
||||
SubscribeHtlcEvents: s.htlcNotifier.SubscribeHtlcEvents,
|
||||
}
|
||||
|
||||
genInvoiceFeatures := func() *lnwire.FeatureVector {
|
||||
|
Loading…
Reference in New Issue
Block a user