Skip to content

Commit

Permalink
multi: bump lnd+lndclient compile time dependency
Browse files Browse the repository at this point in the history
This commit bumps the compile time dependency of lnd and lndclient to
the 0.16.x branch. This makes the code forward compatible but does not
yet change anything with respect to the minimum required version the
user needs to run.
  • Loading branch information
guggero committed Mar 8, 2023
1 parent a4f9df5 commit 30c7ef6
Showing 13 changed files with 369 additions and 165 deletions.
5 changes: 3 additions & 2 deletions account/interfaces.go
Original file line number Diff line number Diff line change
@@ -468,8 +468,9 @@ type TxSource interface {
// limit the block range that we query over. These values can be left
// as zero to include all blocks. To include unconfirmed transactions
// in the query, endHeight must be set to -1.
ListTransactions(ctx context.Context, startHeight,
endHeight int32) ([]lndclient.Transaction, error)
ListTransactions(ctx context.Context, startHeight, endHeight int32,
opts ...lndclient.ListTransactionsOption) (
[]lndclient.Transaction, error)
}

// TxFeeEstimator is a type that provides us with a realistic fee estimation to
13 changes: 9 additions & 4 deletions account/mock_interfaces.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 13 additions & 6 deletions account/mock_test.go
Original file line number Diff line number Diff line change
@@ -254,6 +254,8 @@ type mockWallet struct {
chainfee.SatPerKWeight) (*wire.MsgTx, error)
}

var _ lndclient.WalletKitClient = (*mockWallet)(nil)

func newMockWallet() *mockWallet {
return &mockWallet{
publishChan: make(chan *wire.MsgTx, 1),
@@ -312,7 +314,8 @@ func (w *mockWallet) NextAddr(context.Context, string,
}

func (w *mockWallet) ListTransactions(context.Context, int32,
int32) ([]lndclient.Transaction, error) {
int32, ...lndclient.ListTransactionsOption) ([]lndclient.Transaction,
error) {

return w.txs, nil
}
@@ -327,8 +330,8 @@ func (w *mockWallet) interceptSendOutputs(f func(context.Context, []*wire.TxOut,
w.sendOutputs = f
}

func (w *mockWallet) ListUnspent(_ context.Context, _, _ int32) (
[]*lnwallet.Utxo, error) {
func (w *mockWallet) ListUnspent(context.Context, int32, int32,
...lndclient.ListUnspentOption) ([]*lnwallet.Utxo, error) {

return w.utxos, nil
}
@@ -446,7 +449,7 @@ func (w *mockWallet) FinalizePsbt(_ context.Context, packet *psbt.Packet,
// MuSig2CreateSession creates a new musig session with the key and signers
// provided.
func (w *mockWallet) MuSig2CreateSession(_ context.Context,
_ *keychain.KeyLocator, _ [][32]byte,
version input.MuSig2Version, _ *keychain.KeyLocator, _ [][]byte,
opts ...lndclient.MuSig2SessionOpts) (*input.MuSig2SessionInfo, error) {

var (
@@ -469,6 +472,7 @@ func (w *mockWallet) MuSig2CreateSession(_ context.Context,
TaprootInternalKey: nil,
HaveAllNonces: false,
HaveAllSigs: false,
Version: version,
}

w.Lock()
@@ -565,6 +569,8 @@ type mockChainNotifier struct {
errChan chan error
}

var _ lndclient.ChainNotifierClient = (*mockChainNotifier)(nil)

func newMockChainNotifier() *mockChainNotifier {
return &mockChainNotifier{
confChan: make(chan *chainntnfs.TxConfirmation),
@@ -575,8 +581,9 @@ func newMockChainNotifier() *mockChainNotifier {
}

func (n *mockChainNotifier) RegisterConfirmationsNtfn(ctx context.Context,
txid *chainhash.Hash, pkScript []byte, numConfs,
heightHint int32) (chan *chainntnfs.TxConfirmation, chan error, error) {
txid *chainhash.Hash, pkScript []byte, numConfs, heightHint int32,
opts ...lndclient.NotifierOption) (chan *chainntnfs.TxConfirmation,
chan error, error) {

return n.confChan, n.errChan, nil
}
2 changes: 1 addition & 1 deletion chaninfo/scb_keyring.go
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@ import "github.com/lightningnetwork/lnd/keychain"
// scbEncryptionKeyLocator is the key locator used to obtain the key with which
// a channel backup is encrypted with.
var scbEncryptionKeyLocator = keychain.KeyLocator{
Family: keychain.KeyFamilyStaticBackup,
Family: keychain.KeyFamilyBaseEncryption,
Index: 0,
}

15 changes: 12 additions & 3 deletions config.go
Original file line number Diff line number Diff line change
@@ -431,15 +431,24 @@ func loadCertWithCreate(cfg *Config) (tls.Certificate, *x509.Certificate,
!lnrpc.FileExists(cfg.TLSKeyPath) {

log.Infof("Generating TLS certificates...")
err := cert.GenCertPair(
defaultSelfSignedOrganization, cfg.TLSCertPath,
cfg.TLSKeyPath, cfg.TLSExtraIPs,
certBytes, keyBytes, err := cert.GenCertPair(
defaultSelfSignedOrganization, cfg.TLSExtraIPs,
cfg.TLSExtraDomains, cfg.TLSDisableAutofill,
DefaultAutogenValidity,
)
if err != nil {
return tls.Certificate{}, nil, err
}

// Now that we have the certificate and key, we'll store them
// to the file system.
err = cert.WriteCertPair(
cfg.TLSCertPath, cfg.TLSKeyPath, certBytes, keyBytes,
)
if err != nil {
return tls.Certificate{}, nil, err
}

log.Infof("Done generating TLS certificates")
}

99 changes: 57 additions & 42 deletions go.mod
Original file line number Diff line number Diff line change
@@ -3,13 +3,13 @@ module github.com/lightninglabs/pool
go 1.18

require (
github.com/btcsuite/btcd v0.23.3
github.com/btcsuite/btcd/btcec/v2 v2.2.1
github.com/btcsuite/btcd/btcutil v1.1.2
github.com/btcsuite/btcd v0.23.5-0.20230125025938-be056b0a0b2f
github.com/btcsuite/btcd/btcec/v2 v2.3.2
github.com/btcsuite/btcd/btcutil v1.1.3
github.com/btcsuite/btcd/btcutil/psbt v1.1.5
github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1
github.com/btcsuite/btcd/chaincfg/chainhash v1.0.2
github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f
github.com/btcsuite/btcwallet v0.16.1
github.com/btcsuite/btcwallet v0.16.7
github.com/btcsuite/btcwallet/wallet/txrules v1.2.0
github.com/btcsuite/btcwallet/wtxmgr v1.5.0
github.com/davecgh/go-spew v1.1.1
@@ -18,18 +18,19 @@ require (
github.com/grpc-ecosystem/grpc-gateway/v2 v2.5.0
github.com/jessevdk/go-flags v1.4.0
github.com/lightninglabs/aperture v0.1.18-beta
github.com/lightninglabs/lndclient v0.15.1-5
github.com/lightninglabs/lndclient v0.16.0-9
github.com/lightninglabs/pool/auctioneerrpc v1.0.7
github.com/lightninglabs/protobuf-hex-display v1.4.3-hex-display
github.com/lightningnetwork/lnd v0.15.4-beta
github.com/lightningnetwork/lnd/cert v1.1.1
github.com/lightningnetwork/lnd/tlv v1.0.3
github.com/lightningnetwork/lnd/tor v1.0.1
github.com/stretchr/testify v1.7.1
github.com/lightningnetwork/lnd v0.16.0-beta.rc2
github.com/lightningnetwork/lnd/cert v1.2.1
github.com/lightningnetwork/lnd/kvdb v1.4.1
github.com/lightningnetwork/lnd/tlv v1.1.0
github.com/lightningnetwork/lnd/tor v1.1.0
github.com/stretchr/testify v1.8.1
github.com/urfave/cli v1.22.9
go.etcd.io/bbolt v1.3.6
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
google.golang.org/grpc v1.39.0
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4
google.golang.org/grpc v1.41.0
google.golang.org/protobuf v1.27.1
gopkg.in/macaroon-bakery.v2 v2.0.1
gopkg.in/macaroon.v2 v2.1.0
@@ -49,6 +50,7 @@ require (
github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd // indirect
github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792 // indirect
github.com/btcsuite/winsvc v1.0.0 // indirect
github.com/cenkalti/backoff/v4 v4.1.1 // indirect
github.com/cespare/xxhash/v2 v2.1.1 // indirect
github.com/coreos/go-semver v0.3.0 // indirect
github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f // indirect
@@ -58,14 +60,14 @@ require (
github.com/decred/dcrd/lru v1.0.0 // indirect
github.com/dsnet/compress v0.0.1 // indirect
github.com/dustin/go-humanize v1.0.0 // indirect
github.com/dvyukov/go-fuzz v0.0.0-20210602112143-b1f3d6f4ef4e // indirect
github.com/fergusstrange/embedded-postgres v1.10.0 // indirect
github.com/form3tech-oss/jwt-go v3.2.3+incompatible // indirect
github.com/go-errors/errors v1.0.1 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang-jwt/jwt/v4 v4.4.2 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/google/btree v1.0.1 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/gorilla/websocket v1.4.2 // indirect
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect
@@ -84,19 +86,21 @@ require (
github.com/jrick/logrotate v1.0.0 // indirect
github.com/json-iterator/go v1.1.11 // indirect
github.com/juju/loggo v0.0.0-20210728185423-eebad3a902c4 // indirect
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
github.com/kkdai/bstream v1.0.0 // indirect
github.com/klauspost/compress v1.13.6 // indirect
github.com/klauspost/pgzip v1.2.5 // indirect
github.com/lib/pq v1.10.3 // indirect
github.com/lightninglabs/gozmq v0.0.0-20191113021534-d20a764486bf // indirect
github.com/lightninglabs/neutrino v0.14.2 // indirect
github.com/lightningnetwork/lightning-onion v1.0.2-0.20220211021909-bb84a1ccb0c5 // indirect
github.com/lightninglabs/neutrino v0.15.0 // indirect
github.com/lightninglabs/neutrino/cache v1.1.1 // indirect
github.com/lightningnetwork/lightning-onion v1.2.1-0.20221202012345-ca23184850a1 // indirect
github.com/lightningnetwork/lnd/clock v1.1.0 // indirect
github.com/lightningnetwork/lnd/healthcheck v1.2.2 // indirect
github.com/lightningnetwork/lnd/kvdb v1.3.1 // indirect
github.com/lightningnetwork/lnd/queue v1.1.0 // indirect
github.com/lightningnetwork/lnd/ticker v1.1.0 // indirect
github.com/ltcsuite/ltcd v0.0.0-20190101042124-f37f8bf35796 // indirect
github.com/mattn/go-isatty v0.0.16 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
github.com/mholt/archiver/v3 v3.5.0 // indirect
github.com/miekg/dns v1.1.43 // indirect
@@ -109,52 +113,63 @@ require (
github.com/prometheus/client_model v0.2.0 // indirect
github.com/prometheus/common v0.26.0 // indirect
github.com/prometheus/procfs v0.6.0 // indirect
github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0 // indirect
github.com/rogpeppe/fastuuid v1.2.0 // indirect
github.com/russross/blackfriday/v2 v2.0.1 // indirect
github.com/shurcooL/sanitized_anchor_name v1.0.0 // indirect
github.com/sirupsen/logrus v1.7.0 // indirect
github.com/soheilhy/cmux v0.1.5 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/stretchr/objx v0.2.0 // indirect
github.com/stretchr/objx v0.5.0 // indirect
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect
github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802 // indirect
github.com/tv42/zbase32 v0.0.0-20160707012821-501572607d02 // indirect
github.com/ulikunitz/xz v0.5.10 // indirect
github.com/xdg-go/stringprep v1.0.3 // indirect
github.com/xdg-go/stringprep v1.0.4 // indirect
github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 // indirect
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 // indirect
gitlab.com/yawning/bsaes.git v0.0.0-20190805113838-0a714cd429ec // indirect
go.etcd.io/etcd/api/v3 v3.5.1 // indirect
go.etcd.io/etcd/client/pkg/v3 v3.5.1 // indirect
go.etcd.io/etcd/client/v2 v2.305.1 // indirect
go.etcd.io/etcd/client/v3 v3.5.1 // indirect
go.etcd.io/etcd/pkg/v3 v3.5.1 // indirect
go.etcd.io/etcd/raft/v3 v3.5.1 // indirect
go.etcd.io/etcd/server/v3 v3.5.1 // indirect
go.opentelemetry.io/contrib v0.20.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.20.0 // indirect
go.opentelemetry.io/otel v0.20.0 // indirect
go.opentelemetry.io/otel/exporters/otlp v0.20.0 // indirect
go.opentelemetry.io/otel/metric v0.20.0 // indirect
go.opentelemetry.io/otel/sdk v0.20.0 // indirect
go.opentelemetry.io/otel/sdk/export/metric v0.20.0 // indirect
go.opentelemetry.io/otel/sdk/metric v0.20.0 // indirect
go.opentelemetry.io/otel/trace v0.20.0 // indirect
go.opentelemetry.io/proto/otlp v0.7.0 // indirect
go.etcd.io/etcd/api/v3 v3.5.7 // indirect
go.etcd.io/etcd/client/pkg/v3 v3.5.7 // indirect
go.etcd.io/etcd/client/v2 v2.305.7 // indirect
go.etcd.io/etcd/client/v3 v3.5.7 // indirect
go.etcd.io/etcd/pkg/v3 v3.5.7 // indirect
go.etcd.io/etcd/raft/v3 v3.5.7 // indirect
go.etcd.io/etcd/server/v3 v3.5.7 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.25.0 // indirect
go.opentelemetry.io/otel v1.0.1 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.0.1 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.0.1 // indirect
go.opentelemetry.io/otel/sdk v1.0.1 // indirect
go.opentelemetry.io/otel/trace v1.0.1 // indirect
go.opentelemetry.io/proto/otlp v0.9.0 // indirect
go.uber.org/atomic v1.7.0 // indirect
go.uber.org/multierr v1.6.0 // indirect
go.uber.org/zap v1.17.0 // indirect
golang.org/x/crypto v0.1.0 // indirect
golang.org/x/net v0.7.0 // indirect
golang.org/x/sys v0.5.0 // indirect
golang.org/x/term v0.5.0 // indirect
golang.org/x/text v0.7.0 // indirect
golang.org/x/exp v0.0.0-20221111094246-ab4555d3164f // indirect
golang.org/x/mod v0.6.0 // indirect
golang.org/x/net v0.4.0 // indirect
golang.org/x/sys v0.3.0 // indirect
golang.org/x/term v0.3.0 // indirect
golang.org/x/text v0.5.0 // indirect
golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba // indirect
golang.org/x/tools v0.2.0 // indirect
google.golang.org/genproto v0.0.0-20210617175327-b9e0b3197ced // indirect
gopkg.in/errgo.v1 v1.0.1 // indirect
gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
lukechampine.com/uint128 v1.2.0 // indirect
modernc.org/cc/v3 v3.40.0 // indirect
modernc.org/ccgo/v3 v3.16.13 // indirect
modernc.org/libc v1.22.2 // indirect
modernc.org/mathutil v1.5.0 // indirect
modernc.org/memory v1.4.0 // indirect
modernc.org/opt v0.1.3 // indirect
modernc.org/sqlite v1.20.3 // indirect
modernc.org/strutil v1.1.3 // indirect
modernc.org/token v1.0.1 // indirect
sigs.k8s.io/yaml v1.2.0 // indirect
)

Loading

0 comments on commit 30c7ef6

Please sign in to comment.