Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ env:

# If you change this value, please change it in the following files as well:
# /Dockerfile
GO_VERSION: 1.23.6
GO_VERSION: 1.26.8

jobs:
########################
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM --platform=${BUILDPLATFORM} golang:1.23.6-alpine as builder
FROM --platform=${BUILDPLATFORM} golang:1.26.8-alpine as builder

# Force Go to use the cgo based DNS resolver. This is required to ensure DNS
# queries required to connect to linked containers succeed.
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,5 +95,4 @@ $ make install
This will install the binaries into your `$GOPATH/bin` directory.

## Compatibility
Lightning Pool requires `lnd` version `0.15.4-beta` or higher (`v0.16.0-beta` or
later is recommended).
Lightning Pool requires `lnd` version `0.19.0-beta` or higher.
6 changes: 3 additions & 3 deletions account/interfaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"fmt"

"github.com/btcsuite/btcd/btcec/v2"
"github.com/btcsuite/btcd/btcutil"
"github.com/btcsuite/btcd/txscript"
"github.com/btcsuite/btcd/wire"
"github.com/btcsuite/btcd/btcutil/v2"
"github.com/btcsuite/btcd/txscript/v2"
"github.com/btcsuite/btcd/wire/v2"
"github.com/btcsuite/btcwallet/wtxmgr"
"github.com/lightninglabs/lndclient"
"github.com/lightninglabs/pool/poolscript"
Expand Down
2 changes: 1 addition & 1 deletion account/interfaces_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"reflect"
"testing"

"github.com/btcsuite/btcd/wire"
"github.com/btcsuite/btcd/wire/v2"
)

// TestAccountCopy ensures that a deep copy of an account is constructed
Expand Down
16 changes: 8 additions & 8 deletions account/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ import (
"github.com/btcsuite/btcd/blockchain"
"github.com/btcsuite/btcd/btcec/v2"
"github.com/btcsuite/btcd/btcec/v2/schnorr"
"github.com/btcsuite/btcd/btcutil"
"github.com/btcsuite/btcd/btcutil/hdkeychain"
"github.com/btcsuite/btcd/btcutil/psbt"
"github.com/btcsuite/btcd/btcutil/txsort"
"github.com/btcsuite/btcd/chaincfg"
"github.com/btcsuite/btcd/chaincfg/chainhash"
"github.com/btcsuite/btcd/txscript"
"github.com/btcsuite/btcd/wire"
"github.com/btcsuite/btcd/btcutil/v2"
"github.com/btcsuite/btcd/btcutil/v2/hdkeychain"
"github.com/btcsuite/btcd/btcutil/v2/txsort"
"github.com/btcsuite/btcd/chaincfg/v2"
"github.com/btcsuite/btcd/chainhash/v2"
"github.com/btcsuite/btcd/psbt/v2"
"github.com/btcsuite/btcd/txscript/v2"
"github.com/btcsuite/btcd/wire/v2"
"github.com/btcsuite/btcwallet/wallet"
"github.com/btcsuite/btcwallet/wallet/txrules"
"github.com/btcsuite/btcwallet/wtxmgr"
Expand Down
27 changes: 14 additions & 13 deletions account/manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@ import (
"testing"
"time"

btcaddr "github.com/btcsuite/btcd/address/v2"
"github.com/btcsuite/btcd/btcec/v2"
"github.com/btcsuite/btcd/btcutil"
"github.com/btcsuite/btcd/btcutil/psbt"
"github.com/btcsuite/btcd/chaincfg"
"github.com/btcsuite/btcd/txscript"
"github.com/btcsuite/btcd/wire"
"github.com/btcsuite/btcd/btcutil/v2"
"github.com/btcsuite/btcd/chaincfg/v2"
"github.com/btcsuite/btcd/psbt/v2"
"github.com/btcsuite/btcd/txscript/v2"
"github.com/btcsuite/btcd/wire/v2"
"github.com/davecgh/go-spew/spew"
"github.com/lightningnetwork/lnd/chainntnfs"
"github.com/lightningnetwork/lnd/input"
Expand Down Expand Up @@ -295,13 +296,13 @@ func (h *testHarness) assertSpendTxBroadcast(accountBeforeSpend *Account,
)
require.NoError(h.t, err)
require.Len(h.t, addrs, 1)
addr, ok := addrs[0].(*btcutil.AddressWitnessPubKeyHash)
addr, ok := addrs[0].(*btcaddr.AddressWitnessPubKeyHash)
if !ok {
h.t.Fatalf("expected P2WPKH address, found %T", addr)
}
// Witness program of address returned by the mock
// implementation of NextAddr.
witnessProgram := btcutil.Hash160(testRawTraderKey)
witnessProgram := btcaddr.Hash160(testRawTraderKey)
if !bytes.Equal(addr.WitnessProgram(), witnessProgram) {
h.t.Fatalf("expected witness program %x, got %x",
witnessProgram, addr.WitnessProgram())
Expand Down Expand Up @@ -628,7 +629,7 @@ func TestResumeAccountAfterRestart(t *testing.T) {
// still have a persisted intent to create the account.
go func() {
_, _ = h.manager.InitAccount(
context.Background(), value, tc.version,
t.Context(), value, tc.version,
chainfee.FeePerKwFloor, expiry, bestHeight,
)
}()
Expand Down Expand Up @@ -827,7 +828,7 @@ func TestAccountClose(t *testing.T) {
// We'll immediately attempt to close the account with the
// test's fee expression.
_, err := h.manager.CloseAccount(
context.Background(), account.TraderKey.PubKey,
t.Context(), account.TraderKey.PubKey,
tc.feeExpr, bestHeight,
)

Expand Down Expand Up @@ -1075,7 +1076,7 @@ func TestAccountWithdrawal(t *testing.T) {
// withdrawal to a dust output, which should fail.
dustOutput := &wire.TxOut{Value: 0, PkScript: p2wsh}
_, _, err := h.manager.WithdrawAccount(
context.Background(), account.TraderKey.PubKey,
t.Context(), account.TraderKey.PubKey,
[]*wire.TxOut{dustOutput}, feeRate, bestHeight, 0,
tc.newVersion,
)
Expand Down Expand Up @@ -1107,7 +1108,7 @@ func TestAccountWithdrawal(t *testing.T) {
// If successful, we'll follow with a series of assertions to
// ensure it was performed correctly.
_, _, err = h.manager.WithdrawAccount(
context.Background(), account.TraderKey.PubKey, outputs,
t.Context(), account.TraderKey.PubKey, outputs,
feeRate, bestHeight, 0, tc.newVersion,
)
require.NoError(h.t, err)
Expand Down Expand Up @@ -1306,7 +1307,7 @@ func TestAccountDeposit(t *testing.T) {
// If successful, we'll follow with a series of assertions to
// ensure it was performed correctly.
_, _, err := h.manager.DepositAccount(
context.Background(), account.TraderKey.PubKey,
t.Context(), account.TraderKey.PubKey,
depositAmount, feeRate, bestHeight, 0, tc.newVersion,
)

Expand Down Expand Up @@ -1430,7 +1431,7 @@ func TestAccountConsecutiveBatches(t *testing.T) {
// The RPC server will notify the manager each time a
// batch is finalized, we do the same here.
err = h.manager.WatchMatchedAccounts(
context.Background(),
t.Context(),
[]*btcec.PublicKey{account.TraderKey.PubKey},
)
require.NoError(t, err)
Expand Down
4 changes: 2 additions & 2 deletions account/mock_interfaces.go

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

22 changes: 12 additions & 10 deletions account/mock_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@ import (
"sync"
"time"

btcaddr "github.com/btcsuite/btcd/address/v2"
"github.com/btcsuite/btcd/btcec/v2"
"github.com/btcsuite/btcd/btcec/v2/schnorr"
"github.com/btcsuite/btcd/btcutil"
"github.com/btcsuite/btcd/btcutil/psbt"
"github.com/btcsuite/btcd/chaincfg"
"github.com/btcsuite/btcd/chaincfg/chainhash"
"github.com/btcsuite/btcd/txscript"
"github.com/btcsuite/btcd/wire"
"github.com/btcsuite/btcd/btcutil/v2"
"github.com/btcsuite/btcd/chaincfg/v2"
"github.com/btcsuite/btcd/chainhash/v2"
"github.com/btcsuite/btcd/psbt/v2"
"github.com/btcsuite/btcd/txscript/v2"
"github.com/btcsuite/btcd/wire/v2"
"github.com/btcsuite/btcwallet/wtxmgr"
"github.com/lightninglabs/lndclient"
"github.com/lightninglabs/pool/poolscript"
Expand Down Expand Up @@ -296,10 +297,10 @@ func (w *mockWallet) SendOutputs(ctx context.Context, outputs []*wire.TxOut,
}

func (w *mockWallet) NextAddr(context.Context, string,
walletrpc.AddressType, bool) (btcutil.Address, error) {
walletrpc.AddressType, bool) (btcaddr.Address, error) {

pubKeyHash := btcutil.Hash160(testTraderKey.SerializeCompressed())
return btcutil.NewAddressWitnessPubKeyHash(
pubKeyHash := btcaddr.Hash160(testTraderKey.SerializeCompressed())
return btcaddr.NewAddressWitnessPubKeyHash(
pubKeyHash, &chaincfg.MainNetParams,
)
}
Expand Down Expand Up @@ -616,7 +617,8 @@ func (n *mockChainNotifier) RegisterConfirmationsNtfn(ctx context.Context,

func (n *mockChainNotifier) RegisterSpendNtfn(ctx context.Context,
outpoint *wire.OutPoint, pkScript []byte,
heightHint int32) (chan *chainntnfs.SpendDetail, chan error, error) {
heightHint int32, _ ...lndclient.NotifierOption) (
chan *chainntnfs.SpendDetail, chan error, error) {

return n.spendChan, n.errChan, nil
}
Expand Down
6 changes: 3 additions & 3 deletions account/recovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import (
"os"

"github.com/btcsuite/btcd/btcec/v2"
"github.com/btcsuite/btcd/btcutil"
"github.com/btcsuite/btcd/chaincfg"
"github.com/btcsuite/btcd/btcutil/v2"
"github.com/btcsuite/btcd/chaincfg/v2"
"github.com/btcsuite/btcd/rpcclient"
"github.com/btcsuite/btcd/wire"
"github.com/btcsuite/btcd/wire/v2"
"github.com/lightninglabs/lndclient"
"github.com/lightninglabs/pool/poolscript"
"github.com/lightningnetwork/lnd/keychain"
Expand Down
7 changes: 3 additions & 4 deletions account/recovery_test.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
package account

import (
"context"
"testing"

"github.com/btcsuite/btcd/btcec/v2"
"github.com/btcsuite/btcd/btcutil"
"github.com/btcsuite/btcd/wire"
"github.com/btcsuite/btcd/btcutil/v2"
"github.com/btcsuite/btcd/wire/v2"
"github.com/lightninglabs/pool/internal/test"
"github.com/lightninglabs/pool/poolscript"
"github.com/lightningnetwork/lnd/keychain"
Expand Down Expand Up @@ -258,7 +257,7 @@ func TestGenerateRecoveryKeys(t *testing.T) {

walletKit := test.NewMockWalletKit()
keys, err := GenerateRecoveryKeys(
context.Background(), DefaultAccountKeyWindow, walletKit,
t.Context(), DefaultAccountKeyWindow, walletKit,
)
if err != nil {
t.Fatalf("could not generate keys: %v", err)
Expand Down
4 changes: 2 additions & 2 deletions account/watcher/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"sync"

"github.com/btcsuite/btcd/btcec/v2"
"github.com/btcsuite/btcd/chaincfg/chainhash"
"github.com/btcsuite/btcd/wire"
"github.com/btcsuite/btcd/chainhash/v2"
"github.com/btcsuite/btcd/wire/v2"
"github.com/lightninglabs/lndclient"
"github.com/lightningnetwork/lnd/chainntnfs"
"google.golang.org/grpc/codes"
Expand Down
4 changes: 2 additions & 2 deletions account/watcher/controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"time"

"github.com/btcsuite/btcd/btcec/v2"
"github.com/btcsuite/btcd/chaincfg/chainhash"
"github.com/btcsuite/btcd/wire"
"github.com/btcsuite/btcd/chainhash/v2"
"github.com/btcsuite/btcd/wire/v2"
"github.com/lightninglabs/pool/internal/test"
"github.com/lightningnetwork/lnd/chainntnfs"
"github.com/stretchr/testify/assert"
Expand Down
4 changes: 2 additions & 2 deletions account/watcher/interfaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package watcher

import (
"github.com/btcsuite/btcd/btcec/v2"
"github.com/btcsuite/btcd/chaincfg/chainhash"
"github.com/btcsuite/btcd/wire"
"github.com/btcsuite/btcd/chainhash/v2"
"github.com/btcsuite/btcd/wire/v2"
"github.com/lightningnetwork/lnd/chainntnfs"
)

Expand Down
4 changes: 2 additions & 2 deletions account/watcher/mock_interface_test.go

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

8 changes: 4 additions & 4 deletions auctioneer/account_subscription_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func TestAccountSubscriptionAuthenticate(t *testing.T) {
// First, kick off the auth handshake in a goroutine. Every step will
// block because we don't use buffered channels.
go func() {
errChan <- sub.authenticate(context.Background())
errChan <- sub.authenticate(t.Context())
}()

// Step 1: We expect a commitment message.
Expand Down Expand Up @@ -115,7 +115,7 @@ func TestAccountSubscriptionAuthenticateAbort(t *testing.T) {
// First, kick off the auth handshake in a goroutine. Every step will
// block because we don't use buffered channels.
go func() {
errChan <- sub.authenticate(context.Background())
errChan <- sub.authenticate(t.Context())
}()

// Step 1: We expect a commitment message.
Expand Down Expand Up @@ -163,7 +163,7 @@ func TestAccountSubscriptionAuthenticateContextClose(t *testing.T) {
msgChan: srvMsgChan,
batchVersion: order.LatestBatchVersion,
}
ctxc, cancel = context.WithCancel(context.Background())
ctxc, cancel = context.WithCancel(t.Context())
)

// First, kick off the auth handshake in a goroutine. Every step will
Expand Down Expand Up @@ -224,7 +224,7 @@ func TestAccountSubscriptionAuthenticateError(t *testing.T) {
// First, kick off the auth handshake in a goroutine. Every step will
// block because we don't use buffered channels.
go func() {
errChan <- sub.authenticate(context.Background())
errChan <- sub.authenticate(t.Context())
}()

// Step 1: We expect a commitment message.
Expand Down
2 changes: 1 addition & 1 deletion auctioneer/batch.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"fmt"
"strings"

"github.com/btcsuite/btcd/wire"
"github.com/btcsuite/btcd/wire/v2"
"github.com/lightninglabs/pool/account"
"github.com/lightninglabs/pool/auctioneerrpc"
"github.com/lightninglabs/pool/clientdb"
Expand Down
6 changes: 3 additions & 3 deletions auctioneer/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ import (
"time"

"github.com/btcsuite/btcd/btcec/v2"
"github.com/btcsuite/btcd/btcutil"
"github.com/btcsuite/btcd/chaincfg/chainhash"
"github.com/btcsuite/btcd/wire"
"github.com/btcsuite/btcd/btcutil/v2"
"github.com/btcsuite/btcd/chainhash/v2"
"github.com/btcsuite/btcd/wire/v2"
"github.com/lightninglabs/lndclient"
"github.com/lightninglabs/pool/account"
"github.com/lightninglabs/pool/auctioneerrpc"
Expand Down
2 changes: 1 addition & 1 deletion auctioneer/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ func runCleanupCase(t *testing.T, pubKey [33]byte,
resCh := make(chan result, 1)
go func() {
sub, canRecover, err := c.connectAndAuthenticate(
context.Background(), testAccountDesc, true,
t.Context(), testAccountDesc, true,
)
resCh <- result{sub, canRecover, err}
}()
Expand Down
2 changes: 1 addition & 1 deletion auctioneer/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"strings"

"github.com/btcsuite/btcd/btcutil"
"github.com/btcsuite/btcd/btcutil/v2"
"github.com/lightninglabs/pool/auctioneerrpc"
"github.com/lightninglabs/pool/clientdb"
)
Expand Down
2 changes: 1 addition & 1 deletion chaninfo/channel_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"fmt"

"github.com/btcsuite/btcd/btcec/v2"
"github.com/btcsuite/btcd/wire"
"github.com/btcsuite/btcd/wire/v2"
"github.com/lightninglabs/lndclient"
"github.com/lightningnetwork/lnd/chanbackup"
)
Expand Down
4 changes: 2 additions & 2 deletions clientdb/account_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"testing"

"github.com/btcsuite/btcd/btcec/v2"
"github.com/btcsuite/btcd/btcutil"
"github.com/btcsuite/btcd/wire"
"github.com/btcsuite/btcd/btcutil/v2"
"github.com/btcsuite/btcd/wire/v2"
"github.com/davecgh/go-spew/spew"
"github.com/lightninglabs/pool/account"
"github.com/lightninglabs/pool/poolscript"
Expand Down
2 changes: 1 addition & 1 deletion clientdb/batch_snapshot.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"fmt"
"io"

"github.com/btcsuite/btcd/wire"
"github.com/btcsuite/btcd/wire/v2"
"github.com/lightninglabs/pool/account"
"github.com/lightninglabs/pool/codec"
"github.com/lightninglabs/pool/order"
Expand Down
Loading
Loading