Skip to content

Commit

Permalink
Merge branch 'main' of github.com:Elenpay/liquidator into update-deps…
Browse files Browse the repository at this point in the history
…-vulns
  • Loading branch information
Jossec101 committed Apr 17, 2024
2 parents b5cf798 + 245b205 commit 2a48099
Show file tree
Hide file tree
Showing 31 changed files with 1,781 additions and 34,370 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.19
go-version: 1.22

- name: Build
run: go build -v ./...
Expand Down
7 changes: 2 additions & 5 deletions .justfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,13 @@ run *args='': build
install-loopd-loop:
cd loop/cmd/loop && go install .
cd loop/cmd/loopd && go install .
compile-lnrpc-proto:
rm -rf ./github.com/lightningnetwork/lnd && protoc -I lnd/lnrpc --go_out=. --go-grpc_out=. lnd/lnrpc/*.proto && cd ./github.com/lightningnetwork/lnd/lnrpc && go mod init lnrpc

compile-nodeguard-proto:
rm -rf nodeguard && protoc -I rpc --go_out=. --go-grpc_out=. rpc/*.proto && mockgen -destination ./nodeguard/nodeguard_mock.go -source nodeguard/nodeguard_grpc.pb.go -package nodeguard && mockgen -destination ./nodeguard/nodeguard_mock.go -source nodeguard/nodeguard_grpc.pb.go -package nodeguard
compile-lnd-client-mock:
mockgen -destination lightning_rpc_mock.go -source lnd/lnrpc/lightning_grpc.pb.go -package main
compile-provider-mock:
mockgen -destination ./provider/provider_mock.go -source provider/provider.go -package provider && mockgen -destination ./provider/loopd_mock.go -source loop/looprpc/client_grpc.pb.go -package provider
compile-loop-proto:
rm -rf ./github.com/lightninglabs/loop && cd loop && protoc -I. -I looprpc -I swapserverrpc --go_out=.. --go-grpc_out=.. looprpc/*.proto && cd ../github.com/lightninglabs/loop/looprpc && go mod init looprpc
mockgen -destination ./provider/provider_mock.go -source provider/provider.go -package provider && mockgen -destination ./provider/loopd_mock.go -source loop/looprpc/client_grpc.pb.go -package provider
cover-test:
go test ./... -coverprofile=coverage.out; go tool cover -html=coverage.out
start-loopserver: build-loopserver
Expand Down
6 changes: 3 additions & 3 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,21 @@
"version": "0.2.0",
"configurations": [
{
"name": "Launch Package",
"name": "Debug liquidator",
"type": "go",
"request": "launch",
"mode": "debug",
"program": "${workspaceFolder}",
"env": {
"LNDCONNECTURIS": "lndconnect://127.0.0.1:10003?cert=MIICJTCCAcygAwIBAgIQLYfp6m1vP9wFBXOcE-UsaDAKBggqhkjOPQQDAjAxMR8wHQYDVQQKExZsbmQgYXV0b2dlbmVyYXRlZCBjZXJ0MQ4wDAYDVQQDEwVjYXJvbDAeFw0yMzAzMjkxNTM4MjBaFw0yNDA1MjMxNTM4MjBaMDExHzAdBgNVBAoTFmxuZCBhdXRvZ2VuZXJhdGVkIGNlcnQxDjAMBgNVBAMTBWNhcm9sMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEcXT4dekJnAiZWd8Pk3FgL1BSFXMRwLGSAlk7Di5hIJnIA1B_o8RWKzlPz7u3Aw5mmWHhN8B2MWMylWlWB2130KOBxTCBwjAOBgNVHQ8BAf8EBAMCAqQwEwYDVR0lBAwwCgYIKwYBBQUHAwEwDwYDVR0TAQH_BAUwAwEB_zAdBgNVHQ4EFgQUDOS-19_0LFGf62WRyaaUSLc3j98wawYDVR0RBGQwYoIFY2Fyb2yCCWxvY2FsaG9zdIIFY2Fyb2yCDnBvbGFyLW4xLWNhcm9sggR1bml4ggp1bml4cGFja2V0ggdidWZjb25uhwR_AAABhxAAAAAAAAAAAAAAAAAAAAABhwSsFQAFMAoGCCqGSM49BAMCA0cAMEQCHxYe59PCXrTtSmGsOjfQo6V-sS8j73cqWOzTQbvgI3gCIQCj7sOxnZWBwilec7t8bBXjwPgX9frv8408JW4QhNFOUg&macaroon=AgEDbG5kAvgBAwoQHsW2NwwWb2yOKFMWQQkUWhIBMBoWCg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c3VnZ2VzdGlvbnMSBHJlYWQSBXdyaXRlGhUKBHN3YXASB2V4ZWN1dGUSBHJlYWQaDQoFdGVybXMSBHJlYWQAAAYgHb_8HcZwROzXASOxItpkbD3XAWHy1Ye32vlc1ccLeg8",
"OTEL_RESOURCE_ATTRIBUTES": "service.name=liquidator,service.version=0.1.0",
"OTEL_EXPORTER_OTLP_ENDPOINT": "host.docker.internal:4317"
}
Expand Down
2 changes: 1 addition & 1 deletion errors/errors.go → customerrors/errors.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package errors
package customerrors

// Error type for when a swap is in progress
type SwapInProgressError struct {
Expand Down
Loading

0 comments on commit 2a48099

Please sign in to comment.