Skip to content

Commit 2bf9b42

Browse files
authored
Merge pull request #561 from bhandras/lnd-v0.16.0-beta
build: bump lnd dep to v0.16.0-beta
2 parents 7f19c43 + 4d34eb9 commit 2bf9b42

File tree

9 files changed

+74
-337
lines changed

9 files changed

+74
-337
lines changed

client_test.go

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ func TestLoopOutSuccess(t *testing.T) {
6565
signalPrepaymentResult := ctx.AssertPaid(prepayInvoiceDesc)
6666

6767
// Expect client to register for conf.
68-
confIntent := ctx.AssertRegisterConf(false, req.HtlcConfirmations)
68+
confIntent := ctx.Context.AssertRegisterConf(false, req.HtlcConfirmations)
6969

7070
testLoopOutSuccess(ctx, testRequest.Amount, info.SwapHash,
7171
signalPrepaymentResult, signalSwapPaymentResult, false,
@@ -89,7 +89,7 @@ func TestLoopOutFailOffchain(t *testing.T) {
8989
signalSwapPaymentResult := ctx.AssertPaid(swapInvoiceDesc)
9090
signalPrepaymentResult := ctx.AssertPaid(prepayInvoiceDesc)
9191

92-
ctx.AssertRegisterConf(false, defaultConfirmations)
92+
ctx.Context.AssertRegisterConf(false, defaultConfirmations)
9393

9494
signalSwapPaymentResult(
9595
errors.New(lndclient.PaymentResultUnknownPaymentHash),
@@ -274,7 +274,9 @@ func testLoopOutResume(t *testing.T, confs uint32, expired, preimageRevealed,
274274
signalPrepaymentResult := ctx.AssertPaid(prepayInvoiceDesc)
275275

276276
// Expect client to register for our expected number of confirmations.
277-
confIntent := ctx.AssertRegisterConf(preimageRevealed, int32(confs))
277+
confIntent := ctx.Context.AssertRegisterConf(
278+
preimageRevealed, int32(confs),
279+
)
278280

279281
htlc, err := GetHtlc(
280282
hash, &pendingSwap.Contract.SwapContract,
@@ -325,7 +327,7 @@ func testLoopOutSuccess(ctx *testContext, amt btcutil.Amount, hash lntypes.Hash,
325327

326328
// Expect a signing request in the non taproot case.
327329
if scriptVersion != swap.HtlcV3 {
328-
<-ctx.Lnd.SignOutputRawChannel
330+
<-ctx.Context.Lnd.SignOutputRawChannel
329331
}
330332

331333
if !preimageRevealed {
@@ -345,14 +347,14 @@ func testLoopOutSuccess(ctx *testContext, amt btcutil.Amount, hash lntypes.Hash,
345347
ctx.expiryChan <- testTime
346348
ctx.assertPreimagePush(testPreimage)
347349
}
348-
<-ctx.Lnd.SignOutputRawChannel
350+
<-ctx.Context.Lnd.SignOutputRawChannel
349351
}
350352

351353
// Expect client on-chain sweep of HTLC.
352354
sweepTx := ctx.ReceiveTx()
353355

354356
require.Equal(
355-
ctx.T, htlcOutpoint.Hash[:],
357+
ctx.Context.T, htlcOutpoint.Hash[:],
356358
sweepTx.TxIn[0].PreviousOutPoint.Hash[:],
357359
"client not sweeping from htlc tx",
358360
)
@@ -369,12 +371,12 @@ func testLoopOutSuccess(ctx *testContext, amt btcutil.Amount, hash lntypes.Hash,
369371
// Check preimage.
370372
clientPreImage := sweepTx.TxIn[0].Witness[preImageIndex]
371373
clientPreImageHash := sha256.Sum256(clientPreImage)
372-
require.Equal(ctx.T, hash, lntypes.Hash(clientPreImageHash))
374+
require.Equal(ctx.Context.T, hash, lntypes.Hash(clientPreImageHash))
373375

374376
// Since we successfully published our sweep, we expect the preimage to
375377
// have been pushed to our mock server.
376378
preimage, err := lntypes.MakePreimage(clientPreImage)
377-
require.NoError(ctx.T, err)
379+
require.NoError(ctx.Context.T, err)
378380

379381
if scriptVersion != swap.HtlcV3 {
380382
ctx.assertPreimagePush(preimage)

go.mod

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,25 @@ require (
77
github.com/btcsuite/btcd/btcutil/psbt v1.1.5
88
github.com/btcsuite/btcd/chaincfg/chainhash v1.0.2
99
github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f
10-
github.com/btcsuite/btcwallet v0.16.6-0.20221208210930-6f3f55efb230
10+
github.com/btcsuite/btcwallet v0.16.7
1111
github.com/btcsuite/btcwallet/wtxmgr v1.5.0
1212
github.com/coreos/bbolt v1.3.3
1313
github.com/davecgh/go-spew v1.1.1
1414
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1
1515
github.com/fortytw2/leaktest v1.3.0
1616
github.com/grpc-ecosystem/grpc-gateway/v2 v2.5.0
1717
github.com/jessevdk/go-flags v1.4.0
18-
github.com/lightninglabs/aperture v0.1.18-beta
19-
github.com/lightninglabs/lndclient v0.16.0-8
18+
github.com/lightninglabs/aperture v0.1.20-beta
19+
github.com/lightninglabs/lndclient v0.16.0-10
2020
github.com/lightninglabs/loop/swapserverrpc v1.0.1
2121
github.com/lightninglabs/protobuf-hex-display v1.4.3-hex-display
22-
github.com/lightningnetwork/lnd v0.15.0-beta.rc6.0.20230207162325-a233df99c49d
22+
github.com/lightningnetwork/lnd v0.16.0-beta
2323
github.com/lightningnetwork/lnd/cert v1.2.1
2424
github.com/lightningnetwork/lnd/clock v1.1.0
2525
github.com/lightningnetwork/lnd/queue v1.1.0
2626
github.com/lightningnetwork/lnd/ticker v1.1.0
2727
github.com/lightningnetwork/lnd/tor v1.1.0
28-
github.com/stretchr/testify v1.8.0
28+
github.com/stretchr/testify v1.8.1
2929
github.com/urfave/cli v1.22.9
3030
golang.org/x/net v0.7.0
3131
google.golang.org/grpc v1.41.0
@@ -91,7 +91,8 @@ require (
9191
github.com/klauspost/pgzip v1.2.5 // indirect
9292
github.com/lib/pq v1.10.3 // indirect
9393
github.com/lightninglabs/gozmq v0.0.0-20191113021534-d20a764486bf // indirect
94-
github.com/lightninglabs/neutrino v0.14.2 // indirect
94+
github.com/lightninglabs/neutrino v0.15.0 // indirect
95+
github.com/lightninglabs/neutrino/cache v1.1.1 // indirect
9596
github.com/lightningnetwork/lightning-onion v1.2.1-0.20221202012345-ca23184850a1 // indirect
9697
github.com/lightningnetwork/lnd/healthcheck v1.2.2 // indirect
9798
github.com/lightningnetwork/lnd/kvdb v1.4.1 // indirect
@@ -117,12 +118,11 @@ require (
117118
github.com/sirupsen/logrus v1.7.0 // indirect
118119
github.com/soheilhy/cmux v0.1.5 // indirect
119120
github.com/spf13/pflag v1.0.5 // indirect
120-
github.com/stretchr/objx v0.4.0 // indirect
121+
github.com/stretchr/objx v0.5.0 // indirect
121122
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect
122123
github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802 // indirect
123124
github.com/tv42/zbase32 v0.0.0-20160707012821-501572607d02 // indirect
124125
github.com/ulikunitz/xz v0.5.10 // indirect
125-
github.com/xdg-go/stringprep v1.0.4 // indirect
126126
github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 // indirect
127127
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 // indirect
128128
gitlab.com/yawning/bsaes.git v0.0.0-20190805113838-0a714cd429ec // indirect
@@ -174,4 +174,9 @@ require (
174174
// TODO(bhandras): remove when the next swapserverrpc is tagged.
175175
replace github.com/lightninglabs/loop/swapserverrpc => ./swapserverrpc
176176

177+
// We need to use grpc v1.39.0 because of a change in how HTTP errors are
178+
// formatted and sent to the client. This change was introduced in grpc v1.40.0
179+
// with https://github.com/grpc/grpc-go/pull/4474.
180+
replace google.golang.org/grpc => google.golang.org/grpc v1.39.0
181+
177182
go 1.18

0 commit comments

Comments
 (0)