chainreg: export ChainCode to new pkg

Moves chainCode from the lnd package to the chainreg package,
where it is exported and can be used by other packages.
This commit is contained in:
Eugene
2020-09-29 08:56:18 -07:00
committed by eugene
parent afb6ad295e
commit 933b959aa8
8 changed files with 80 additions and 67 deletions

View File

@ -32,6 +32,7 @@ import (
proxy "github.com/grpc-ecosystem/grpc-gateway/runtime"
"github.com/lightningnetwork/lnd/autopilot"
"github.com/lightningnetwork/lnd/build"
"github.com/lightningnetwork/lnd/chainreg"
"github.com/lightningnetwork/lnd/chanacceptor"
"github.com/lightningnetwork/lnd/chanbackup"
"github.com/lightningnetwork/lnd/chanfitness"
@ -4679,7 +4680,7 @@ func (r *rpcServer) AddInvoice(ctx context.Context,
invoice *lnrpc.Invoice) (*lnrpc.AddInvoiceResponse, error) {
defaultDelta := r.cfg.Bitcoin.TimeLockDelta
if r.cfg.registeredChains.PrimaryChain() == litecoinChain {
if r.cfg.registeredChains.PrimaryChain() == chainreg.LitecoinChain {
defaultDelta = r.cfg.Litecoin.TimeLockDelta
}