Skip to content

Commit 45eb57a

Browse files
authored
Merge pull request #733 from hieblmi/static-addr-staging
Static addr staging
2 parents 7ff3318 + 0e91b99 commit 45eb57a

35 files changed

+1187
-460
lines changed

Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,11 @@ ifneq ($(workers),)
3434
LINT_WORKERS = --concurrency=$(workers)
3535
endif
3636

37-
DOCKER_TOOLS = docker run -v $$(pwd):/build loop-tools
37+
DOCKER_TOOLS = docker run \
38+
--rm \
39+
-v $(shell bash -c "go env GOCACHE || (mkdir -p /tmp/go-cache; echo /tmp/go-cache)"):/tmp/build/.cache \
40+
-v $(shell bash -c "go env GOMODCACHE || (mkdir -p /tmp/go-modcache; echo /tmp/go-modcache)"):/tmp/build/.modcache \
41+
-v $$(pwd):/build loop-tools
3842

3943
GREEN := "\\033[0;32m"
4044
NC := "\\033[0m"

cmd/loop/instantout.go

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,3 +202,31 @@ func instantOut(ctx *cli.Context) error {
202202

203203
return nil
204204
}
205+
206+
var listInstantOutsCommand = cli.Command{
207+
Name: "listinstantouts",
208+
Usage: "list all instant out swaps",
209+
Description: `
210+
List all instant out swaps.
211+
`,
212+
Action: listInstantOuts,
213+
}
214+
215+
func listInstantOuts(ctx *cli.Context) error {
216+
// First set up the swap client itself.
217+
client, cleanup, err := getClient(ctx)
218+
if err != nil {
219+
return err
220+
}
221+
defer cleanup()
222+
223+
resp, err := client.ListInstantOuts(
224+
context.Background(), &looprpc.ListInstantOutsRequest{},
225+
)
226+
if err != nil {
227+
return err
228+
}
229+
230+
printRespJSON(resp)
231+
return nil
232+
}

cmd/loop/main.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,8 @@ func main() {
148148
listSwapsCommand, swapInfoCommand, getLiquidityParamsCommand,
149149
setLiquidityRuleCommand, suggestSwapCommand, setParamsCommand,
150150
getInfoCommand, abandonSwapCommand, reservationsCommands,
151-
instantOutCommand, staticAddressCommands,
151+
instantOutCommand, listInstantOutsCommand,
152+
staticAddressCommands,
152153
}
153154

154155
err := app.Run(os.Args)

go.mod

Lines changed: 23 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ require (
1515
github.com/fortytw2/leaktest v1.3.0
1616
github.com/golang-migrate/migrate/v4 v4.16.1
1717
github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3
18-
github.com/jackc/pgconn v1.14.0
18+
github.com/jackc/pgconn v1.14.3
1919
github.com/jackc/pgerrcode v0.0.0-20220416144525-469b46aa5efa
20-
github.com/jackc/pgx/v4 v4.18.1
20+
github.com/jackc/pgx/v4 v4.18.2
2121
github.com/jessevdk/go-flags v1.4.0
2222
github.com/lib/pq v1.10.7
2323
github.com/lightninglabs/aperture v0.1.21-beta.0.20230705004936-87bb996a4030
@@ -32,12 +32,12 @@ require (
3232
github.com/ory/dockertest/v3 v3.10.0
3333
github.com/stretchr/testify v1.8.4
3434
github.com/urfave/cli v1.22.9
35-
golang.org/x/net v0.17.0
35+
golang.org/x/net v0.23.0
3636
google.golang.org/grpc v1.59.0
3737
google.golang.org/protobuf v1.31.0
3838
gopkg.in/macaroon-bakery.v2 v2.1.0
3939
gopkg.in/macaroon.v2 v2.1.0
40-
modernc.org/sqlite v1.20.3
40+
modernc.org/sqlite v1.29.5
4141
)
4242

4343
require (
@@ -68,11 +68,11 @@ require (
6868
github.com/decred/dcrd/crypto/blake256 v1.0.0 // indirect
6969
github.com/decred/dcrd/lru v1.0.0 // indirect
7070
github.com/docker/cli v20.10.17+incompatible // indirect
71-
github.com/docker/docker v24.0.7+incompatible // indirect
71+
github.com/docker/docker v24.0.9+incompatible // indirect
7272
github.com/docker/go-connections v0.4.0 // indirect
7373
github.com/docker/go-units v0.5.0 // indirect
7474
github.com/dsnet/compress v0.0.1 // indirect
75-
github.com/dustin/go-humanize v1.0.0 // indirect
75+
github.com/dustin/go-humanize v1.0.1 // indirect
7676
github.com/fergusstrange/embedded-postgres v1.10.0 // indirect
7777
github.com/go-errors/errors v1.0.1 // indirect
7878
github.com/go-logr/logr v1.3.0 // indirect
@@ -90,11 +90,12 @@ require (
9090
github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect
9191
github.com/hashicorp/errwrap v1.1.0 // indirect
9292
github.com/hashicorp/go-multierror v1.1.1 // indirect
93+
github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect
9394
github.com/imdario/mergo v0.3.13 // indirect
9495
github.com/jackc/chunkreader/v2 v2.0.1 // indirect
9596
github.com/jackc/pgio v1.0.0 // indirect
9697
github.com/jackc/pgpassfile v1.0.0 // indirect
97-
github.com/jackc/pgproto3/v2 v2.3.2 // indirect
98+
github.com/jackc/pgproto3/v2 v2.3.3 // indirect
9899
github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect
99100
github.com/jackc/pgtype v1.14.0 // indirect
100101
github.com/jackpal/gateway v1.0.5 // indirect
@@ -103,7 +104,6 @@ require (
103104
github.com/jrick/logrotate v1.0.0 // indirect
104105
github.com/json-iterator/go v1.1.12 // indirect
105106
github.com/juju/loggo v0.0.0-20210728185423-eebad3a902c4 // indirect
106-
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
107107
github.com/kkdai/bstream v1.0.0 // indirect
108108
github.com/klauspost/compress v1.15.9 // indirect
109109
github.com/klauspost/pgzip v1.2.5 // indirect
@@ -123,6 +123,7 @@ require (
123123
github.com/moby/term v0.5.0 // indirect
124124
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
125125
github.com/modern-go/reflect2 v1.0.2 // indirect
126+
github.com/ncruces/go-strftime v0.1.9 // indirect
126127
github.com/nwaples/rardecode v1.1.2 // indirect
127128
github.com/opencontainers/go-digest v1.0.0 // indirect
128129
github.com/opencontainers/image-spec v1.0.2 // indirect
@@ -134,7 +135,7 @@ require (
134135
github.com/prometheus/client_model v0.3.0 // indirect
135136
github.com/prometheus/common v0.30.0 // indirect
136137
github.com/prometheus/procfs v0.7.3 // indirect
137-
github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0 // indirect
138+
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
138139
github.com/rogpeppe/fastuuid v1.2.0 // indirect
139140
github.com/russross/blackfriday/v2 v2.0.1 // indirect
140141
github.com/shurcooL/sanitized_anchor_name v1.0.0 // indirect
@@ -172,31 +173,28 @@ require (
172173
go.uber.org/atomic v1.7.0 // indirect
173174
go.uber.org/multierr v1.6.0 // indirect
174175
go.uber.org/zap v1.17.0 // indirect
175-
golang.org/x/crypto v0.17.0 // indirect
176-
golang.org/x/exp v0.0.0-20230315142452-642cacee5cc0 // indirect
177-
golang.org/x/mod v0.10.0 // indirect
178-
golang.org/x/sync v0.3.0 // indirect
179-
golang.org/x/sys v0.15.0 // indirect
180-
golang.org/x/term v0.15.0 // indirect
176+
golang.org/x/crypto v0.21.0 // indirect
177+
golang.org/x/exp v0.0.0-20231108232855-2478ac86f678 // indirect
178+
golang.org/x/mod v0.14.0 // indirect
179+
golang.org/x/sync v0.6.0 // indirect
180+
golang.org/x/sys v0.18.0 // indirect
181+
golang.org/x/term v0.18.0 // indirect
181182
golang.org/x/text v0.14.0 // indirect
182183
golang.org/x/time v0.3.0 // indirect
183-
golang.org/x/tools v0.9.1 // indirect
184+
golang.org/x/tools v0.17.0 // indirect
184185
google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d // indirect
185186
google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d // indirect
186187
google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect
187188
gopkg.in/errgo.v1 v1.0.1 // indirect
188189
gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect
189190
gopkg.in/yaml.v2 v2.4.0 // indirect
190191
gopkg.in/yaml.v3 v3.0.1 // indirect
191-
lukechampine.com/uint128 v1.2.0 // indirect
192-
modernc.org/cc/v3 v3.40.0 // indirect
193-
modernc.org/ccgo/v3 v3.16.13 // indirect
194-
modernc.org/libc v1.22.2 // indirect
195-
modernc.org/mathutil v1.5.0 // indirect
196-
modernc.org/memory v1.4.0 // indirect
197-
modernc.org/opt v0.1.3 // indirect
198-
modernc.org/strutil v1.1.3 // indirect
199-
modernc.org/token v1.0.1 // indirect
192+
modernc.org/gc/v3 v3.0.0-20240107210532-573471604cb6 // indirect
193+
modernc.org/libc v1.41.0 // indirect
194+
modernc.org/mathutil v1.6.0 // indirect
195+
modernc.org/memory v1.7.2 // indirect
196+
modernc.org/strutil v1.2.0 // indirect
197+
modernc.org/token v1.1.0 // indirect
200198
sigs.k8s.io/yaml v1.2.0 // indirect
201199
)
202200

0 commit comments

Comments
 (0)