diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..91c3072 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,18 @@ +FROM golang:1.19 as app-builder +ARG TOKEN +ENV ENV_TOKEN $TOKEN + +WORKDIR /go/src/app +COPY . . +RUN make clean linux && ls -ali ./release/balance-agent*linux* + +FROM scratch + +ENV AWS_DEFAULT_REGION us-east-1 + +COPY --from=alpine:latest /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ +COPY --from=app-builder /go/src/app/release/balance-agent*linux* /balance-agent +VOLUME ["/tmp"] + +USER 666 +ENTRYPOINT ["/balance-agent"] diff --git a/lightning_api/api.go b/lightning_api/api.go index de02fd9..565f55f 100644 --- a/lightning_api/api.go +++ b/lightning_api/api.go @@ -6,6 +6,7 @@ import ( entities "github.com/bolt-observer/go_common/entities" "github.com/getsentry/sentry-go" + "github.com/golang/glog" ) type ApiType int @@ -202,7 +203,9 @@ func getNodeInfoFull(l LightingApiCalls, threshUseDescribeGraph int, ctx context } c, err := l.GetChanInfo(ctx, ch.ChanId) if err != nil { - return nil, err + glog.Warningf("Could not get channel info for %v: %v", ch.ChanId, err) + extendedNodeInfo.NumChannels -= 1 + continue } private, ok := privateMapping[ch.ChanId] extendedNodeInfo.Channels = append(extendedNodeInfo.Channels, NodeChannelApiExtended{NodeChannelApi: *c, Private: ok && private})