mirror of
https://github.com/lightninglabs/pool.git
synced 2026-08-13 12:33:04 +02:00
server: store the version of the connected lnd node
We'll use this in a follow up commit to decide what channel type we want to use.
This commit is contained in:
parent
67fb1b4b97
commit
eecb470538
1 changed files with 19 additions and 0 deletions
19
server.go
19
server.go
|
|
@ -52,6 +52,18 @@ var (
|
|||
"signrpc", "walletrpc", "chainrpc", "invoicesrpc",
|
||||
},
|
||||
}
|
||||
|
||||
// scriptEnforceVersion is the version of lnd that enabled lease duration script
|
||||
// enforcement as a new channel type. We'll use this to decide what
|
||||
// order type to default to.
|
||||
scriptEnforceVersion = &verrpc.Version{
|
||||
AppMajor: 0,
|
||||
AppMinor: 14,
|
||||
AppPatch: 0,
|
||||
BuildTags: []string{
|
||||
"signrpc", "walletrpc", "chainrpc", "invoicesrpc",
|
||||
},
|
||||
}
|
||||
)
|
||||
|
||||
// Server is the main poold trader server.
|
||||
|
|
@ -71,6 +83,8 @@ type Server struct {
|
|||
// client or an error if none has been established yet.
|
||||
GetIdentity func() (*lsat.TokenID, error)
|
||||
|
||||
lndVersion *verrpc.Version
|
||||
|
||||
cfg *Config
|
||||
db *clientdb.DB
|
||||
fundingManager *funding.Manager
|
||||
|
|
@ -128,6 +142,11 @@ func (s *Server) Start() error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// Now that we have lnd, lets extract the current version so we can use
|
||||
// this to gate features that we'll use based on the functionality
|
||||
// available.
|
||||
s.lndVersion = s.lndServices.Version
|
||||
|
||||
// As there're some other lower-level operations we may need access to,
|
||||
// we'll also make a connection for a "basic client".
|
||||
//
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue