Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,12 @@ unit:
mkdir -p app/build && touch app/build/index.html
$(UNIT)

#? unit-debug: Run unit tests with debug log output enabled
unit-debug:
@$(call print, "Running unit tests.")
mkdir -p app/build && touch app/build/index.html
$(UNIT_DEBUG)

unit-cover: $(GOACC_BIN)
@$(call print, "Running unit coverage tests.")
$(GOACC_BIN) $(COVER_PKG)
Expand All @@ -211,13 +217,13 @@ clean-itest:
@$(call print, "Cleaning itest binaries.")
rm -rf itest/litd-itest itest/btcd-itest itest/lnd-itest

build-itest: app-build
build-itest:
@$(call print, "Building itest binaries.")
CGO_ENABLED=0 $(GOBUILD) -tags="$(ITEST_TAGS)" -o itest/litd-itest -ldflags "$(ITEST_LDFLAGS)" $(PKG)/cmd/litd
CGO_ENABLED=0 $(GOBUILD) -tags="$(ITEST_TAGS)" -o itest/btcd-itest -ldflags "$(ITEST_LDFLAGS)" $(BTCD_PKG)
CGO_ENABLED=0 $(GOBUILD) -tags="$(ITEST_TAGS)" -o itest/lnd-itest -ldflags "$(ITEST_LDFLAGS)" $(LND_PKG)/cmd/lnd

itest-only:
itest-only: build-itest
@$(call print, "Building itest binary.")
CGO_ENABLED=0 $(GOBUILD) -tags="$(ITEST_TAGS)" -o itest/litd-itest -ldflags "$(ITEST_LDFLAGS)" $(PKG)/cmd/litd
CGO_ENABLED=0 $(GOTEST) -v ./itest -tags="$(DEV_TAGS) $(ITEST_TAGS)" -c -o itest/itest.test
Expand All @@ -226,7 +232,7 @@ itest-only:
rm -rf itest/*.log itest/.logs*; date
scripts/itest_part.sh $(ITEST_FLAGS)

itest: build-itest itest-only
itest: app-build build-itest itest-only

# =============
# FLAKE HUNTING
Expand Down Expand Up @@ -308,6 +314,11 @@ 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

#? flakehunter-unit: Run the unit tests continuously until one fails
flakehunter-unit:
@$(call print, "Flake hunting unit test.")
scripts/unit-test-flake-hunter.sh ${pkg} ${case}

# Prevent make from interpreting any of the defined goals as folders or files to
# include in the build process.
.PHONY: default all yarn-install build install go-build go-build-noui \
Expand Down
5 changes: 2 additions & 3 deletions accounts/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ import (
"context"
"fmt"

"github.com/btcsuite/btclog"
"github.com/lightningnetwork/lnd/build"
"github.com/btcsuite/btclog/v2"
)

// ContextKey is the type that we use to identify account specific values in the
Expand Down Expand Up @@ -95,5 +94,5 @@ func requestScopedValuesFromCtx(ctx context.Context) (btclog.Logger,

prefix := fmt.Sprintf("[account: %s, request: %d]", acc.ID, reqID)

return build.NewPrefixLog(prefix, log), acc, reqID, nil
return log.WithPrefix(prefix), acc, reqID, nil
}
2 changes: 1 addition & 1 deletion accounts/log.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package accounts

import (
"github.com/btcsuite/btclog"
"github.com/btcsuite/btclog/v2"
"github.com/lightningnetwork/lnd/build"
)

Expand Down
70 changes: 70 additions & 0 deletions app/src/types/generated/lnd_pb.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading