Skip to content
Open
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
20 changes: 20 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,26 @@ jobs:
- name: Generate sql models
run: make sqlc-check

########################
# sample conf check
########################
sample-conf-check:
name: Check sample-litd.conf is valid
runs-on: ubuntu-latest
steps:
- name: git checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: setup go ${{ env.GO_VERSION }}
uses: ./.github/actions/setup-go
with:
go-version: '${{ env.GO_VERSION }}'

- name: check sample-litd.conf options
run: make sample-conf-check

########################
# lint code
########################
Expand Down
11 changes: 10 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,15 @@ fmt: $(GOIMPORTS_BIN)
@$(call print, "Formatting source.")
gofmt -l -w -s $(GOFILES_NOVENDOR)

sample-conf-check:
@$(call print, "Checking sample-litd.conf options are valid")
@HELP=$$(go run -tags="litd_no_ui $(LND_RELEASE_TAGS)" ./cmd/litd --help 2>&1 || true); \
FAILS=0; \
for OPT in $$(grep -E '^;[[:space:]]*[a-z][a-z0-9._-]+=' sample-litd.conf | sed -E 's/^;[[:space:]]*//' | cut -d= -f1); do \
echo "$$HELP" | grep -qE -- "--$${OPT}[= ]" || { echo "Option '$$OPT' missing from litd --help"; FAILS=1; }; \
done; \
exit $$FAILS

check-go-version-yaml:
@$(call print, "Checking for target Go version (v$(GO_VERSION)) in YAML files (*.yaml, *.yml)")
./scripts/check-go-version-yaml.sh $(GO_VERSION)
Expand Down Expand Up @@ -353,5 +362,5 @@ flakehunter-unit:
go-install go-install-noui go-install-cli app-build release go-release \
docker-release docker-tools scratch check unit unit-bench unit-cover unit-race \
clean-itest build-itest build-itest-binary itest-only itest \
itest-parallel flake-unit fmt lint \
itest-parallel flake-unit fmt lint sample-conf-check \
mod mod-check list rpc protos protos-check rpc-js-compile clean
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,10 @@ Move all the configuration settings specific to LiT from `lnd.conf` to
`lit.conf` and remove any previous LiT-specific customizations from the
configuration settings in `lnd.conf`. Note that any section headers (
`[ Example ]`) in `lit.conf` should be removed or changed to comments (
`# Example`).
`; Example`).

For a full reference of all litd-native configuration options with descriptions
and defaults, see [`sample-litd.conf`](./sample-litd.conf) in this repository.

## Usage

Expand Down
Loading