Skip to content

Commit

Permalink
chore: update lnd (#4509)
Browse files Browse the repository at this point in the history
* chore: update lnd + bitcoind

* chore: update bitcoind to v27

* test: fix unexpected pay via routes

* chore: revert bitcoind upgrade

---------

Co-authored-by: Kartik Shah <[email protected]>
  • Loading branch information
dolcalmi and krtk6160 authored Jun 13, 2024
1 parent b44115d commit 1e8b016
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 15 deletions.
18 changes: 7 additions & 11 deletions core/api/test/integration/services/lnd-service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,7 @@ describe("Lnd", () => {
})

it("parses error message from failures object", async () => {
const channel = "1x1x1"
const payArgs = {
lnd: lnd1,
routes: [
Expand All @@ -508,7 +509,7 @@ describe("Lnd", () => {
fee_mtokens: "1000",
hops: [
{
channel: "1x1x1",
channel,
channel_capacity: 1,
fee: 1,
fee_mtokens: "1000",
Expand All @@ -528,9 +529,10 @@ describe("Lnd", () => {
const err = await getError<LnError<{ failures: LnError }>>(() =>
payViaRoutes(payArgs),
)

expect(err).toHaveLength(3)
expect(err[0]).toEqual(503)
expect(err[1]).toBe("UnexpectedErrorWhenPayingViaRoute")
expect(err[0]).toEqual(500)
expect(err[1]).toBe("UnexpectedPayViaRoutesFailure")

const nestedFailureErr = err[2].failures[0]
expect(nestedFailureErr).toHaveLength(3)
Expand All @@ -543,16 +545,10 @@ describe("Lnd", () => {
expect(nestedFailureErr[1]).toBe(err[1])

// @ts-ignore-next-line no-implicit-any error
const nestedErrObj = nestedFailureErr[2].err
expect(nestedErrObj).toBeInstanceOf(Error)
expect(nestedErrObj).toHaveProperty("code")
expect(nestedErrObj).toHaveProperty("metadata")

const expectedDetails = "invalid public key: unsupported format: 0"
expect(nestedErrObj).toHaveProperty("details", expectedDetails)
expect(nestedFailureErr[2]).toHaveProperty("channel", channel)

const parsedErr = parseLndErrorDetails(err)
expect(parsedErr).toBe(expectedDetails)
expect(parsedErr).toBe("UnexpectedPayViaRoutesFailure")
})
})
})
8 changes: 4 additions & 4 deletions dev/docker-compose.deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ services:
environment:
- MONGO_INITDB_DATABASE=galoy
lnd1:
image: lightninglabs/lnd:v0.17.4-beta
image: lightninglabs/lnd:v0.18.0-beta
ports:
- "10009:10009"
volumes:
Expand All @@ -198,7 +198,7 @@ services:
cp /root/.lnd/admin.macaroon /root/.lnd/data/chain/bitcoin/regtest/admin.macaroon
/bin/lnd
lnd2:
image: lightninglabs/lnd:v0.17.4-beta
image: lightninglabs/lnd:v0.18.0-beta
ports:
- "10010:10009"
volumes:
Expand All @@ -218,7 +218,7 @@ services:
cp /root/.lnd/admin.macaroon /root/.lnd/data/chain/bitcoin/regtest/admin.macaroon
/bin/lnd
lnd-outside-1:
image: lightninglabs/lnd:v0.17.4-beta
image: lightninglabs/lnd:v0.18.0-beta
ports:
- "10012:10009"
volumes:
Expand All @@ -238,7 +238,7 @@ services:
/bin/lnd
depends_on: [bitcoind]
lnd-outside-2:
image: lightninglabs/lnd:v0.17.4-beta
image: lightninglabs/lnd:v0.18.0-beta
ports:
- "10013:10009"
volumes:
Expand Down

0 comments on commit 1e8b016

Please sign in to comment.