mirror of
https://github.com/lightninglabs/loop.git
synced 2026-08-13 12:33:03 +02:00
Merge pull request #1028 from starius/downgrade-deps
go.mod: downgrade deps for litd release
This commit is contained in:
commit
b11c959bc8
15 changed files with 36 additions and 317 deletions
22
.github/workflows/main.yml
vendored
22
.github/workflows/main.yml
vendored
|
|
@ -20,7 +20,7 @@ env:
|
|||
|
||||
# If you change this value, please change it in the following files as well:
|
||||
# /Dockerfile
|
||||
GO_VERSION: 1.24.6
|
||||
GO_VERSION: 1.23.12
|
||||
|
||||
jobs:
|
||||
########################
|
||||
|
|
@ -103,26 +103,6 @@ jobs:
|
|||
- name: lint
|
||||
run: make lint
|
||||
|
||||
########################
|
||||
# Verify documentation
|
||||
########################
|
||||
docs-check:
|
||||
name: verify that auto-generated documentation is up-to-date
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: git checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: setup go ${{ env.GO_VERSION }}
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: '~${{ env.GO_VERSION }}'
|
||||
|
||||
- name: check
|
||||
run: make docs-check
|
||||
|
||||
########################
|
||||
# run unit tests
|
||||
########################
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
version: "2"
|
||||
run:
|
||||
go: "1.24"
|
||||
go: "1.23"
|
||||
|
||||
# timeout for analysis
|
||||
timeout: 4m
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
FROM --platform=${BUILDPLATFORM} golang:1.24.6-alpine as builder
|
||||
FROM --platform=${BUILDPLATFORM} golang:1.23.12-alpine as builder
|
||||
|
||||
# Copy in the local repository to build from.
|
||||
COPY . /go/src/github.com/lightningnetwork/loop
|
||||
|
|
|
|||
9
Makefile
9
Makefile
|
|
@ -170,15 +170,6 @@ sqlc-check: sqlc
|
|||
@$(call print, "Verifying sql code generation.")
|
||||
if test -n "$$(git status --porcelain '*.go')"; then echo "SQL models not properly generated!"; git status --porcelain '*.go'; exit 1; fi
|
||||
|
||||
docs: build
|
||||
@$(call print, "Building man and markdown files in docs/")
|
||||
./loop-debug man > docs/loop.1
|
||||
./loop-debug markdown > docs/loop.md
|
||||
|
||||
docs-check: docs
|
||||
@$(call print, "Verifying man and markdown files in docs/")
|
||||
if test -n "$$(git status --porcelain 'docs/loop.*')"; then echo "Man and markdown files not properly generated!"; git diff; exit 1; fi
|
||||
|
||||
fsm:
|
||||
@$(call print, "Generating state machine docs")
|
||||
./scripts/fsm-generate.sh;
|
||||
|
|
|
|||
152
cmd/loop/docs.go
152
cmd/loop/docs.go
|
|
@ -1,152 +0,0 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
_ "embed"
|
||||
"fmt"
|
||||
|
||||
docs "github.com/urfave/cli-docs/v3"
|
||||
"github.com/urfave/cli/v3"
|
||||
)
|
||||
|
||||
//go:embed markdown_tabular.md.gotmpl
|
||||
var markdownTabularDocTemplate string
|
||||
|
||||
// We have a copy of this template taken from
|
||||
// https://github.com/urfave/cli-docs where we remove column
|
||||
// "Environment variables" if it has no values.
|
||||
// TODO: remove this when https://github.com/urfave/cli-docs/pull/15
|
||||
// is merged.
|
||||
func init() {
|
||||
docs.MarkdownTabularDocTemplate = markdownTabularDocTemplate
|
||||
}
|
||||
|
||||
var printManCommand = &cli.Command{
|
||||
Name: "man",
|
||||
Usage: "prints man file",
|
||||
Description: "Prints documentation of loop CLI in man format",
|
||||
Action: printMan,
|
||||
Hidden: true,
|
||||
}
|
||||
|
||||
func printMan(_ context.Context, cmd *cli.Command) error {
|
||||
root := filterNestedHelpCommands(cmd.Root())
|
||||
|
||||
const userCommandsSection = 1
|
||||
man, err := docs.ToManWithSection(root, userCommandsSection)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to produce man: %w", err)
|
||||
}
|
||||
|
||||
fmt.Println(man)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
var printMarkdownCommand = &cli.Command{
|
||||
Name: "markdown",
|
||||
Usage: "prints markdown file",
|
||||
Description: "Prints documentation of loop CLI in markdown format",
|
||||
Action: printMarkdown,
|
||||
Hidden: true,
|
||||
}
|
||||
|
||||
func printMarkdown(_ context.Context, cmd *cli.Command) error {
|
||||
root := filterNestedHelpCommands(cmd.Root())
|
||||
|
||||
md, err := docs.ToTabularMarkdown(root, "loop")
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to produce man: %w", err)
|
||||
}
|
||||
|
||||
fmt.Println(md)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// filterNestedHelpCommands clones cmd, drops nested help commands, and normalises
|
||||
// flag defaults so generated documentation avoids absolute paths.
|
||||
func filterNestedHelpCommands(cmd *cli.Command) *cli.Command {
|
||||
cloned := cloneCommand(cmd, 0)
|
||||
overrideDocFlags(cloned)
|
||||
return cloned
|
||||
}
|
||||
|
||||
// cloneCommand clones the command, filtering out nested "help" subcommands.
|
||||
func cloneCommand(cmd *cli.Command, depth int) *cli.Command {
|
||||
if cmd == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
cloned := *cmd
|
||||
if len(cmd.Commands) == 0 {
|
||||
return &cloned
|
||||
}
|
||||
|
||||
filtered := make([]*cli.Command, 0, len(cmd.Commands))
|
||||
for _, sub := range cmd.Commands {
|
||||
if sub == nil {
|
||||
continue
|
||||
}
|
||||
childDepth := depth + 1
|
||||
|
||||
// TODO: remove when https://github.com/urfave/cli-docs/pull/16
|
||||
if childDepth > 0 && sub.Name == "help" {
|
||||
continue
|
||||
}
|
||||
|
||||
filtered = append(filtered, cloneCommand(sub, childDepth))
|
||||
}
|
||||
|
||||
cloned.Commands = filtered
|
||||
return &cloned
|
||||
}
|
||||
|
||||
// overrideDocFlags walks the command tree and replaces string flag defaults
|
||||
// that leak user-specific filesystem paths, keeping generated docs stable.
|
||||
func overrideDocFlags(cmd *cli.Command) {
|
||||
if cmd == nil {
|
||||
return
|
||||
}
|
||||
|
||||
if len(cmd.Flags) > 0 {
|
||||
clonedFlags := make([]cli.Flag, len(cmd.Flags))
|
||||
for i, fl := range cmd.Flags {
|
||||
clonedFlags[i] = cloneFlagWithOverrides(fl)
|
||||
}
|
||||
cmd.Flags = clonedFlags
|
||||
}
|
||||
|
||||
for _, sub := range cmd.Commands {
|
||||
overrideDocFlags(sub)
|
||||
}
|
||||
}
|
||||
|
||||
// docFlagOverrides maps global flag names to the canonical values we want to
|
||||
// show in documentation instead of user-specific absolute paths.
|
||||
var docFlagOverrides = map[string]string{
|
||||
loopDirFlag.Name: "~/.loop",
|
||||
tlsCertFlag.Name: "~/.loop/mainnet/tls.cert",
|
||||
macaroonPathFlag.Name: "~/.loop/mainnet/loop.macaroon",
|
||||
}
|
||||
|
||||
// cloneFlagWithOverrides returns a copy of flag with overridden default values
|
||||
// when the flag participates in docFlagOverrides. Non-string flags are reused
|
||||
// unchanged to minimise allocations.
|
||||
func cloneFlagWithOverrides(flag cli.Flag) cli.Flag {
|
||||
sf, ok := flag.(*cli.StringFlag)
|
||||
if !ok {
|
||||
return flag
|
||||
}
|
||||
|
||||
value, ok := docFlagOverrides[sf.Name]
|
||||
if !ok {
|
||||
return flag
|
||||
}
|
||||
|
||||
cloned := *sf
|
||||
cloned.Value = value
|
||||
cloned.DefaultText = value
|
||||
|
||||
return &cloned
|
||||
}
|
||||
|
|
@ -90,7 +90,6 @@ var (
|
|||
setLiquidityRuleCommand, suggestSwapCommand, setParamsCommand,
|
||||
getInfoCommand, abandonSwapCommand, reservationsCommands,
|
||||
instantOutCommand, listInstantOutsCommand,
|
||||
printManCommand, printMarkdownCommand,
|
||||
}
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,80 +0,0 @@
|
|||
{{ define "flags" }}
|
||||
{{- $hasEnvVars := false -}}
|
||||
{{- range . -}}
|
||||
{{- if and (not $hasEnvVars) .EnvVars -}}
|
||||
{{- $hasEnvVars = true -}}
|
||||
{{- end -}}
|
||||
{{- end }}
|
||||
| Name | Description | Type | Default value {{ if $hasEnvVars }}| Environment variables {{ end }}|
|
||||
|------|-------------|------|:-------------:{{ if $hasEnvVars }}|:---------------------:{{ end }}|
|
||||
{{ range $flag := . -}}
|
||||
{{- /**/ -}} | `{{ $flag.Name }}{{ if $flag.TakesValue }}="…"{{ end }}` {{ if $flag.Aliases }}(`{{ join $flag.Aliases "`, `" }}`) {{ end }}
|
||||
{{- /**/ -}} | {{ $flag.Usage }}
|
||||
{{- /**/ -}} | {{ $flag.Type }}
|
||||
{{- /**/ -}} | {{ if $flag.Default }}`{{ $flag.Default }}`{{ end }}
|
||||
{{- if $hasEnvVars -}}
|
||||
{{- /**/ -}} | {{ if $flag.EnvVars }}`{{ join $flag.EnvVars "`, `" }}`{{ else }}*none*{{ end }}
|
||||
{{- end -}}
|
||||
{{- /**/ -}} |
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "command" }}
|
||||
### `{{ .Name }}` {{ if gt .Level 0 }}sub{{ end }}command{{ if .Aliases }} (aliases: `{{ join .Aliases "`, `" }}`){{ end }}
|
||||
{{ if .Usage }}
|
||||
{{ .Usage }}.
|
||||
{{ end }}
|
||||
{{ if .UsageText }}
|
||||
{{ range $line := .UsageText -}}
|
||||
> {{ $line }}
|
||||
{{ end -}}
|
||||
{{ end }}
|
||||
{{ if .Description }}
|
||||
{{ .Description }}.
|
||||
{{ end }}
|
||||
Usage:
|
||||
|
||||
```bash
|
||||
$ {{ .AppPath }} [GLOBAL FLAGS] {{ .Name }}{{ if .Flags }} [COMMAND FLAGS]{{ end }} {{ if .ArgsUsage }}{{ .ArgsUsage }}{{ else }}[ARGUMENTS...]{{ end }}
|
||||
```
|
||||
|
||||
{{ if .Flags -}}
|
||||
The following flags are supported:
|
||||
{{ template "flags" .Flags }}
|
||||
{{ end -}}
|
||||
|
||||
{{ if .SubCommands -}}
|
||||
{{ range $subCmd := .SubCommands -}}
|
||||
{{ template "command" $subCmd }}
|
||||
{{ end -}}
|
||||
{{ end -}}
|
||||
{{ end }}
|
||||
|
||||
## CLI interface{{ if .Name }} - {{ .Name }}{{ end }}
|
||||
|
||||
{{ if .Description }}{{ .Description }}.
|
||||
{{ end }}
|
||||
{{ if .Usage }}{{ .Usage }}.
|
||||
{{ end }}
|
||||
{{ if .UsageText }}
|
||||
{{ range $line := .UsageText -}}
|
||||
> {{ $line }}
|
||||
{{ end -}}
|
||||
{{ end }}
|
||||
Usage:
|
||||
|
||||
```bash
|
||||
$ {{ .AppPath }}{{ if .GlobalFlags }} [GLOBAL FLAGS]{{ end }} [COMMAND] [COMMAND FLAGS] {{ if .ArgsUsage }}{{ .ArgsUsage }}{{ else }}[ARGUMENTS...]{{ end }}
|
||||
```
|
||||
|
||||
{{ if .GlobalFlags }}
|
||||
Global flags:
|
||||
|
||||
{{ template "flags" .GlobalFlags }}
|
||||
|
||||
{{ end -}}
|
||||
{{ if .Commands -}}
|
||||
{{ range $cmd := .Commands -}}
|
||||
{{ template "command" $cmd }}
|
||||
{{ end }}
|
||||
{{- end }}
|
||||
|
|
@ -67,14 +67,14 @@ for a release using the following commands:
|
|||
```bash
|
||||
$ go version
|
||||
go version go1.25.0 linux/amd64
|
||||
$ go install golang.org/dl/go1.24.6@latest
|
||||
$ go1.24.6 download
|
||||
Unpacking /home/user/sdk/go1.24.6/go1.24.6.linux-amd64.tar.gz ...
|
||||
Success. You may now run 'go1.24.6'
|
||||
$ go1.24.6 version
|
||||
go version go1.24.6 linux/amd64
|
||||
$ go install golang.org/dl/go1.23.12@latest
|
||||
$ go1.23.12 download
|
||||
Unpacking /home/user/sdk/go1.23.12/go1.23.12.linux-amd64.tar.gz ...
|
||||
Success. You may now run 'go1.23.12'
|
||||
$ go1.23.12 version
|
||||
go version go1.23.12 linux/amd64
|
||||
|
||||
$ GO_CMD=/home/user/go/bin/go1.24.6 ./release.sh v0.31.3
|
||||
$ GO_CMD=/home/user/go/bin/go1.23.12 ./release.sh v0.31.5
|
||||
```
|
||||
|
||||
On MacOS, you will need to install GNU tar and GNU gzip, which can be done with
|
||||
|
|
|
|||
17
go.mod
17
go.mod
|
|
@ -20,12 +20,12 @@ require (
|
|||
github.com/jessevdk/go-flags v1.4.0
|
||||
github.com/lib/pq v1.10.9
|
||||
github.com/lightninglabs/aperture v0.3.13-beta
|
||||
github.com/lightninglabs/lndclient v0.20.0-1
|
||||
github.com/lightninglabs/lndclient v0.19.0-12
|
||||
github.com/lightninglabs/loop/looprpc v1.0.7
|
||||
github.com/lightninglabs/loop/swapserverrpc v1.0.14
|
||||
github.com/lightninglabs/taproot-assets v0.7.0-rc1.0.20251014172227-e6ae082c0b4b
|
||||
github.com/lightninglabs/taproot-assets/taprpc v1.0.10-0.20251014172227-e6ae082c0b4b
|
||||
github.com/lightningnetwork/lnd v0.20.0-beta.rc1
|
||||
github.com/lightninglabs/taproot-assets v0.6.1
|
||||
github.com/lightninglabs/taproot-assets/taprpc v1.0.8-0.20250716163904-2ef55ba74036
|
||||
github.com/lightningnetwork/lnd v0.19.3-beta
|
||||
github.com/lightningnetwork/lnd/cert v1.2.2
|
||||
github.com/lightningnetwork/lnd/clock v1.1.1
|
||||
github.com/lightningnetwork/lnd/queue v1.1.1
|
||||
|
|
@ -34,7 +34,6 @@ require (
|
|||
github.com/lightningnetwork/lnd/tor v1.1.6
|
||||
github.com/ory/dockertest/v3 v3.10.0
|
||||
github.com/stretchr/testify v1.10.0
|
||||
github.com/urfave/cli-docs/v3 v3.1.0
|
||||
github.com/urfave/cli/v3 v3.4.1
|
||||
go.etcd.io/bbolt v1.4.3
|
||||
golang.org/x/sync v0.13.0
|
||||
|
|
@ -73,7 +72,6 @@ require (
|
|||
github.com/coreos/go-semver v0.3.0 // indirect
|
||||
github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf // indirect
|
||||
github.com/coreos/go-systemd/v22 v22.5.0 // indirect
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
|
||||
github.com/decred/dcrd/crypto/blake256 v1.0.1 // indirect
|
||||
github.com/decred/dcrd/lru v1.1.2 // indirect
|
||||
github.com/docker/cli v28.1.1+incompatible // indirect
|
||||
|
|
@ -123,11 +121,11 @@ require (
|
|||
github.com/lightninglabs/lightning-node-connect/hashmailrpc v1.0.3 // indirect
|
||||
github.com/lightninglabs/neutrino v0.16.1 // indirect
|
||||
github.com/lightninglabs/neutrino/cache v1.1.2 // indirect
|
||||
github.com/lightningnetwork/lightning-onion v1.2.1-0.20240815225420-8b40adf04ab9 // indirect
|
||||
github.com/lightningnetwork/lightning-onion v1.2.1-0.20240712235311-98bd56499dfb // indirect
|
||||
github.com/lightningnetwork/lnd/fn/v2 v2.0.8 // indirect
|
||||
github.com/lightningnetwork/lnd/healthcheck v1.2.6 // indirect
|
||||
github.com/lightningnetwork/lnd/kvdb v1.4.16 // indirect
|
||||
github.com/lightningnetwork/lnd/sqldb v1.0.11 // indirect
|
||||
github.com/lightningnetwork/lnd/sqldb v1.0.10 // indirect
|
||||
github.com/ltcsuite/ltcd v0.0.0-20190101042124-f37f8bf35796 // indirect
|
||||
github.com/mattn/go-isatty v0.0.20 // indirect
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
|
||||
|
|
@ -151,7 +149,6 @@ require (
|
|||
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
|
||||
github.com/rogpeppe/fastuuid v1.2.0 // indirect
|
||||
github.com/rogpeppe/go-internal v1.14.1 // indirect
|
||||
github.com/russross/blackfriday/v2 v2.1.0 // indirect
|
||||
github.com/sirupsen/logrus v1.9.3 // indirect
|
||||
github.com/soheilhy/cmux v0.1.5 // indirect
|
||||
github.com/spf13/pflag v1.0.6 // indirect
|
||||
|
|
@ -219,4 +216,4 @@ replace github.com/lightninglabs/loop/swapserverrpc => ./swapserverrpc
|
|||
|
||||
replace github.com/lightninglabs/loop/looprpc => ./looprpc
|
||||
|
||||
go 1.24.6
|
||||
go 1.23.12
|
||||
|
|
|
|||
30
go.sum
30
go.sum
|
|
@ -736,8 +736,6 @@ github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf h1:iW4rZ826su+pq
|
|||
github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
|
||||
github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs=
|
||||
github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w=
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
|
||||
github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY=
|
||||
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
|
||||
github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY=
|
||||
|
|
@ -1110,8 +1108,8 @@ github.com/lightninglabs/gozmq v0.0.0-20191113021534-d20a764486bf h1:HZKvJUHlcXI
|
|||
github.com/lightninglabs/gozmq v0.0.0-20191113021534-d20a764486bf/go.mod h1:vxmQPeIQxPf6Jf9rM8R+B4rKBqLA2AjttNxkFBL2Plk=
|
||||
github.com/lightninglabs/lightning-node-connect/hashmailrpc v1.0.3 h1:NuDp6Z+QNMSzZ/+RzWsjgAgQSr/REDxTiHmTczZxlXA=
|
||||
github.com/lightninglabs/lightning-node-connect/hashmailrpc v1.0.3/go.mod h1:bDnEKRN1u13NFBuy/C+bFLhxA5bfd3clT25y76QY0AM=
|
||||
github.com/lightninglabs/lndclient v0.20.0-1 h1:xwDoh7z3bszXc4mkMO6ksEcXhkQw9v0XHJ7fB0LKDNo=
|
||||
github.com/lightninglabs/lndclient v0.20.0-1/go.mod h1:LcbsTCCd0Qw5C4zlv/YqrPY81XUVA6wN1lA/qEWIs+Y=
|
||||
github.com/lightninglabs/lndclient v0.19.0-12 h1:aSIKfnvnHKiyFWppUGHJG5fn8VoF5WG5Lx958ksLmqs=
|
||||
github.com/lightninglabs/lndclient v0.19.0-12/go.mod h1:cicoJY1AwZuRVXGD8Knp50TRT7TGBmw1k37uPQsGQiw=
|
||||
github.com/lightninglabs/migrate/v4 v4.18.2-9023d66a-fork-pr-2 h1:eFjp1dIB2BhhQp/THKrjLdlYuPugO9UU4kDqu91OX/Q=
|
||||
github.com/lightninglabs/migrate/v4 v4.18.2-9023d66a-fork-pr-2/go.mod h1:99BKpIi6ruaaXRM1A77eqZ+FWPQ3cfRa+ZVy5bmWMaY=
|
||||
github.com/lightninglabs/neutrino v0.16.1 h1:5Kz4ToxncEVkpKC6fwUjXKtFKJhuxlG3sBB3MdJTJjs=
|
||||
|
|
@ -1120,14 +1118,14 @@ github.com/lightninglabs/neutrino/cache v1.1.2 h1:C9DY/DAPaPxbFC+xNNEI/z1SJY9GS3
|
|||
github.com/lightninglabs/neutrino/cache v1.1.2/go.mod h1:XJNcgdOw1LQnanGjw8Vj44CvguYA25IMKjWFZczwZuo=
|
||||
github.com/lightninglabs/protobuf-go-hex-display v1.34.2-hex-display h1:w7FM5LH9Z6CpKxl13mS48idsu6F+cEZf0lkyiV+Dq9g=
|
||||
github.com/lightninglabs/protobuf-go-hex-display v1.34.2-hex-display/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw=
|
||||
github.com/lightninglabs/taproot-assets v0.7.0-rc1.0.20251014172227-e6ae082c0b4b h1:wXE4vhZlZGXLHzei+rj6lnWsCaxjJCfCAHJlcs3dZH4=
|
||||
github.com/lightninglabs/taproot-assets v0.7.0-rc1.0.20251014172227-e6ae082c0b4b/go.mod h1:qC9TBmn7gV+6LrDhacCe2DD0MnMbD1FgUzJ14LLb7E8=
|
||||
github.com/lightninglabs/taproot-assets/taprpc v1.0.10-0.20251014172227-e6ae082c0b4b h1:qT27GPShJpH3A/aK7VVi8Onn11GIjEnL/xbqbHMDz/U=
|
||||
github.com/lightninglabs/taproot-assets/taprpc v1.0.10-0.20251014172227-e6ae082c0b4b/go.mod h1:ufuKxkMNdfRnv4IcnLw7ken69DcCUxO79WSpC8mIvdM=
|
||||
github.com/lightningnetwork/lightning-onion v1.2.1-0.20240815225420-8b40adf04ab9 h1:6D3LrdagJweLLdFm1JNodZsBk6iU4TTsBBFLQ4yiXfI=
|
||||
github.com/lightningnetwork/lightning-onion v1.2.1-0.20240815225420-8b40adf04ab9/go.mod h1:EDqJ3MuZIbMq0QI1czTIKDJ/GS8S14RXPwapHw8cw6w=
|
||||
github.com/lightningnetwork/lnd v0.20.0-beta.rc1 h1:8Rm3/pcSLQI+tpCjKfYADfMjmEVFkrtoEom470siKRA=
|
||||
github.com/lightningnetwork/lnd v0.20.0-beta.rc1/go.mod h1:SgniBRmo5pE7IImxIfhUofhgdXkutcV9Znrf/rEZ7TM=
|
||||
github.com/lightninglabs/taproot-assets v0.6.1 h1:98XCk7nvAridyE67uct0NDVpyY1evpIdvPQpeNElskM=
|
||||
github.com/lightninglabs/taproot-assets v0.6.1/go.mod h1:rF+GwuUVuDVUejAHsUCml4Nru9xnl7A4YZQfR4qLMzY=
|
||||
github.com/lightninglabs/taproot-assets/taprpc v1.0.8-0.20250716163904-2ef55ba74036 h1:ZUQrEmdZa72RieBKI/NiUQJGAnh6R6Pq6FoXh+VCOJQ=
|
||||
github.com/lightninglabs/taproot-assets/taprpc v1.0.8-0.20250716163904-2ef55ba74036/go.mod h1:vOM2Ap2wYhEZjiJU7bNNg+e5tDxkvRAuyXwf/KQ4tgo=
|
||||
github.com/lightningnetwork/lightning-onion v1.2.1-0.20240712235311-98bd56499dfb h1:yfM05S8DXKhuCBp5qSMZdtSwvJ+GFzl94KbXMNB1JDY=
|
||||
github.com/lightningnetwork/lightning-onion v1.2.1-0.20240712235311-98bd56499dfb/go.mod h1:c0kvRShutpj3l6B9WtTsNTBUtjSmjZXbJd9ZBRQOSKI=
|
||||
github.com/lightningnetwork/lnd v0.19.3-beta h1:sBOIn+0ZIkvEJh05VPJRSOOhWbJn2EoGtyUAaq/Fgk8=
|
||||
github.com/lightningnetwork/lnd v0.19.3-beta/go.mod h1:MNRzea8Yrgk+ohyUhK7JSpoigE4T9JgerMQQUxMbl9I=
|
||||
github.com/lightningnetwork/lnd/cert v1.2.2 h1:71YK6hogeJtxSxw2teq3eGeuy4rHGKcFf0d0Uy4qBjI=
|
||||
github.com/lightningnetwork/lnd/cert v1.2.2/go.mod h1:jQmFn/Ez4zhDgq2hnYSw8r35bqGVxViXhX6Cd7HXM6U=
|
||||
github.com/lightningnetwork/lnd/clock v1.1.1 h1:OfR3/zcJd2RhH0RU+zX/77c0ZiOnIMsDIBjgjWdZgA0=
|
||||
|
|
@ -1140,8 +1138,8 @@ github.com/lightningnetwork/lnd/kvdb v1.4.16 h1:9BZgWdDfjmHRHLS97cz39bVuBAqMc4/p
|
|||
github.com/lightningnetwork/lnd/kvdb v1.4.16/go.mod h1:HW+bvwkxNaopkz3oIgBV6NEnV4jCEZCACFUcNg4xSjM=
|
||||
github.com/lightningnetwork/lnd/queue v1.1.1 h1:99ovBlpM9B0FRCGYJo6RSFDlt8/vOkQQZznVb18iNMI=
|
||||
github.com/lightningnetwork/lnd/queue v1.1.1/go.mod h1:7A6nC1Qrm32FHuhx/mi1cieAiBZo5O6l8IBIoQxvkz4=
|
||||
github.com/lightningnetwork/lnd/sqldb v1.0.11 h1:X8J3OvdIhJVniQG78Qsp3niErl1zdGMTPvzgiLMWOOo=
|
||||
github.com/lightningnetwork/lnd/sqldb v1.0.11/go.mod h1:oOdZ7vjmAUmI9He+aFHTunnxKVefHZAfJttZdz16hSg=
|
||||
github.com/lightningnetwork/lnd/sqldb v1.0.10 h1:ZLV7TGwjnKupVfCd+DJ43MAc9BKVSFCnvhpSPGKdN3M=
|
||||
github.com/lightningnetwork/lnd/sqldb v1.0.10/go.mod h1:c/vWoQfcxu6FAfHzGajkIQi7CEIeIZFhhH4DYh1BJpc=
|
||||
github.com/lightningnetwork/lnd/ticker v1.1.1 h1:J/b6N2hibFtC7JLV77ULQp++QLtCwT6ijJlbdiZFbSM=
|
||||
github.com/lightningnetwork/lnd/ticker v1.1.1/go.mod h1:waPTRAAcwtu7Ji3+3k+u/xH5GHovTsCoSVpho0KDvdA=
|
||||
github.com/lightningnetwork/lnd/tlv v1.3.2 h1:MO4FCk7F4k5xPMqVZF6Nb/kOpxlwPrUQpYjmyKny5s0=
|
||||
|
|
@ -1268,8 +1266,6 @@ github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7
|
|||
github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ=
|
||||
github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU=
|
||||
github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc=
|
||||
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
|
||||
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
||||
github.com/ruudk/golang-pdf417 v0.0.0-20181029194003-1af4ab5afa58/go.mod h1:6lfFZQK844Gfx8o5WFuvpxWRwnSoipWe/p622j1v06w=
|
||||
github.com/ruudk/golang-pdf417 v0.0.0-20201230142125-a7e3863a1245/go.mod h1:pQAZKsJ8yyVxGRWYNEm9oFB8ieLgKFnamEyDmSA0BRk=
|
||||
github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
|
||||
|
|
@ -1316,8 +1312,6 @@ github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802 h1:uruHq4
|
|||
github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
|
||||
github.com/tv42/zbase32 v0.0.0-20160707012821-501572607d02 h1:tcJ6OjwOMvExLlzrAVZute09ocAGa7KqOON60++Gz4E=
|
||||
github.com/tv42/zbase32 v0.0.0-20160707012821-501572607d02/go.mod h1:tHlrkM198S068ZqfrO6S8HsoJq2bF3ETfTL+kt4tInY=
|
||||
github.com/urfave/cli-docs/v3 v3.1.0 h1:Sa5xm19IpE5gpm6tZzXdfjdFxn67PnEsE4dpXF7vsKw=
|
||||
github.com/urfave/cli-docs/v3 v3.1.0/go.mod h1:59d+5Hz1h6GSGJ10cvcEkbIe3j233t4XDqI72UIx7to=
|
||||
github.com/urfave/cli/v3 v3.4.1 h1:1M9UOCy5bLmGnuu1yn3t3CB4rG79Rtoxuv1sPhnm6qM=
|
||||
github.com/urfave/cli/v3 v3.4.1/go.mod h1:FJSKtM/9AiiTOJL4fJ6TbMUkxBXn7GO9guZqoZtpYpo=
|
||||
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f h1:J9EGpcZtP0E/raorCMxlFGSTBrsSlaDGf3jU/qvAE2c=
|
||||
|
|
|
|||
16
loopout.go
16
loopout.go
|
|
@ -25,9 +25,9 @@ import (
|
|||
"github.com/lightninglabs/taproot-assets/fn"
|
||||
"github.com/lightninglabs/taproot-assets/rfqmsg"
|
||||
"github.com/lightningnetwork/lnd/chainntnfs"
|
||||
"github.com/lightningnetwork/lnd/channeldb"
|
||||
"github.com/lightningnetwork/lnd/lnrpc"
|
||||
"github.com/lightningnetwork/lnd/lntypes"
|
||||
paymentsdb "github.com/lightningnetwork/lnd/payments/db"
|
||||
"github.com/lightningnetwork/lnd/tlv"
|
||||
"google.golang.org/grpc"
|
||||
)
|
||||
|
|
@ -843,17 +843,7 @@ func (s *loopOutSwap) payInvoiceAsync(ctx context.Context,
|
|||
return nil, fmt.Errorf("rfq id has wrong length: %v", n)
|
||||
}
|
||||
|
||||
// In order to still be compatible with the old wire format for
|
||||
// asset HTLCs, we populate both fields.
|
||||
//
|
||||
// Older versions of tapd will ignore the new field and only use
|
||||
// the old one.
|
||||
//
|
||||
// Newer versions will ignore the old field and only use the new
|
||||
// field.
|
||||
htlc := rfqmsg.NewHtlc(
|
||||
nil, fn.Some(rfq), fn.Some([]rfqmsg.ID{rfq}),
|
||||
)
|
||||
htlc := rfqmsg.NewHtlc(nil, fn.Some(rfq))
|
||||
htlcMapRecords, err := tlv.RecordsToMap(htlc.Records())
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
@ -970,7 +960,7 @@ func (s *loopOutSwap) awaitSendPayment(ctx context.Context, hash lntypes.Hash,
|
|||
// payment error from TrackPayment is no longer expected
|
||||
// here.
|
||||
case err := <-payErrChan:
|
||||
if err != paymentsdb.ErrAlreadyPaid {
|
||||
if err != channeldb.ErrAlreadyPaid {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
module github.com/lightninglabs/loop/looprpc
|
||||
|
||||
go 1.23.9
|
||||
go 1.23.12
|
||||
|
||||
require (
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
FROM golang:1.24.6
|
||||
FROM golang:1.23.12
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
git ca-certificates zip gpg && rm -rf /var/lib/apt/lists/*
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ if ! command -v "$GO_CMD" >/dev/null 2>&1; then
|
|||
fi
|
||||
|
||||
# Make sure we have the expected Go version installed.
|
||||
EXPECTED_VERSION="go1.24.6"
|
||||
EXPECTED_VERSION="go1.23.12"
|
||||
INSTALLED_VERSION=$("$GO_CMD" version 2>/dev/null | awk '{print $3}')
|
||||
if [ "$INSTALLED_VERSION" = "$EXPECTED_VERSION" ]; then
|
||||
green "Go version matches expected: $INSTALLED_VERSION"
|
||||
|
|
|
|||
|
|
@ -13,4 +13,4 @@ require (
|
|||
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect
|
||||
)
|
||||
|
||||
go 1.23.9
|
||||
go 1.23.12
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue