Skip to content

Fix builder test in builds without chain-esplora - #1130

Open
benthecarman wants to merge 2 commits into
lightningdevkit:mainfrom
benthecarman:fix-builder-test-chain-source
Open

benthecarman wants to merge 2 commits into
lightningdevkit:mainfrom
benthecarman:fix-builder-test-chain-source

Conversation

@benthecarman

Copy link
Copy Markdown
Contributor

channel_manager_read_failure_fails_build relied on the default Esplora chain source, so it failed with ChainSourceSetupFailed in builds without chain-esplora. Configure a chain source explicitly, and run the sparse PostgreSQL lib tests in CI instead of only compiling them.

benthecarman and others added 2 commits October 6, 2026 23:18
The `channel_manager_read_failure_fails_build` test never configured a
chain source and relied on the builder's default Esplora fallback.
Without the `chain-esplora` feature there is no fallback, so the build
failed with `ChainSourceSetupFailed` before the channel manager read
the test is meant to exercise.

Configure an Esplora or Electrum chain source explicitly. Neither
connects during `build`, so no server is needed. Skip the test if
neither is enabled, as Bitcoind fetches the chain tip during `build` and
fails before the channel manager read when no server is reachable.

This change was written with the help of Claude Code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The PostgreSQL workflow only compiled the library tests for the
`chain-electrum,storage-postgres` feature set. Building and running
the library tests for that set catches failures that only show up
without the default features, such as tests that rely on the default
Esplora chain source.

Set `TEST_POSTGRES_URL` on the step so that the PostgreSQL store tests
use the workflow's PostgreSQL service, the same as the later steps.

This change was written with the help of Claude Code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ldk-reviews-bot

ldk-reviews-bot commented Oct 7, 2026 •

Copy link
Copy Markdown

I've assigned @tnull as a reviewer!
I'll wait for their review and will help manage the review process.
Once they submit their review, I'll check if a second reviewer would be helpful.

@ldk-reviews-bot
ldk-reviews-bot requested a review from tnull October 7, 2026 04:29

@tnull tnull left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I'd prefer to setup

Comment thread src/builder.rs
#[cfg(any(feature = "chain-esplora", feature = "chain-electrum"))]
fn channel_manager_read_failure_fails_build() {
let builder = NodeBuilder::new();
// Esplora and Electrum don't connect during `build`, so no server is needed.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants