mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-06-12 09:52:14 +02:00
server+peer: init peer struct w/ AuxChanCloser if present
This commit is contained in:
parent
625d426a56
commit
44ab7e6b10
@ -42,6 +42,7 @@ import (
|
|||||||
"github.com/lightningnetwork/lnd/lnrpc"
|
"github.com/lightningnetwork/lnd/lnrpc"
|
||||||
"github.com/lightningnetwork/lnd/lnwallet"
|
"github.com/lightningnetwork/lnd/lnwallet"
|
||||||
"github.com/lightningnetwork/lnd/lnwallet/btcwallet"
|
"github.com/lightningnetwork/lnd/lnwallet/btcwallet"
|
||||||
|
"github.com/lightningnetwork/lnd/lnwallet/chancloser"
|
||||||
"github.com/lightningnetwork/lnd/lnwallet/rpcwallet"
|
"github.com/lightningnetwork/lnd/lnwallet/rpcwallet"
|
||||||
"github.com/lightningnetwork/lnd/macaroons"
|
"github.com/lightningnetwork/lnd/macaroons"
|
||||||
"github.com/lightningnetwork/lnd/msgmux"
|
"github.com/lightningnetwork/lnd/msgmux"
|
||||||
@ -182,6 +183,10 @@ type AuxComponents struct {
|
|||||||
// AuxDataParser is an optional data parser that can be used to parse
|
// AuxDataParser is an optional data parser that can be used to parse
|
||||||
// auxiliary data for certain custom channel types.
|
// auxiliary data for certain custom channel types.
|
||||||
AuxDataParser fn.Option[AuxDataParser]
|
AuxDataParser fn.Option[AuxDataParser]
|
||||||
|
|
||||||
|
// AuxChanCloser is an optional channel closer that can be used to
|
||||||
|
// modify the way a coop-close transaction is constructed.
|
||||||
|
AuxChanCloser fn.Option[chancloser.AuxChanCloser]
|
||||||
}
|
}
|
||||||
|
|
||||||
// DefaultWalletImpl is the default implementation of our normal, btcwallet
|
// DefaultWalletImpl is the default implementation of our normal, btcwallet
|
||||||
|
@ -400,6 +400,10 @@ type Config struct {
|
|||||||
// in place.
|
// in place.
|
||||||
MsgRouter fn.Option[msgmux.Router]
|
MsgRouter fn.Option[msgmux.Router]
|
||||||
|
|
||||||
|
// AuxChanCloser is an optional instance of an abstraction that can be
|
||||||
|
// used to modify the way the co-op close transaction is constructed.
|
||||||
|
AuxChanCloser fn.Option[chancloser.AuxChanCloser]
|
||||||
|
|
||||||
// Quit is the server's quit channel. If this is closed, we halt operation.
|
// Quit is the server's quit channel. If this is closed, we halt operation.
|
||||||
Quit chan struct{}
|
Quit chan struct{}
|
||||||
}
|
}
|
||||||
|
@ -4106,6 +4106,7 @@ func (s *server) peerConnected(conn net.Conn, connReq *connmgr.ConnReq,
|
|||||||
AuxLeafStore: s.implCfg.AuxLeafStore,
|
AuxLeafStore: s.implCfg.AuxLeafStore,
|
||||||
AuxSigner: s.implCfg.AuxSigner,
|
AuxSigner: s.implCfg.AuxSigner,
|
||||||
MsgRouter: s.implCfg.MsgRouter,
|
MsgRouter: s.implCfg.MsgRouter,
|
||||||
|
AuxChanCloser: s.implCfg.AuxChanCloser,
|
||||||
}
|
}
|
||||||
|
|
||||||
copy(pCfg.PubKeyBytes[:], peerAddr.IdentityKey.SerializeCompressed())
|
copy(pCfg.PubKeyBytes[:], peerAddr.IdentityKey.SerializeCompressed())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user