Repository navigation
Block-sync-only all-target check imports disabled transaction_sync module #168
Description
Summary
The documented block-sync-only feature set builds the application binary, but cargo check --all-targets fails because an Esplora test module imports transaction_sync while that module is disabled.
Affected revision
- Branch:
dev - Commit:
af03c7f1a65135a429f05a5820600338215954dc - Package version:
0.1.0
Reproduction
cargo +1.94.0 check --locked --all-targets \
--no-default-features \
--features "block-sync,electrum,esplora"Actual result
The command exits with status 101:
error[E0432]: unresolved import `crate::ldk_chain_backend::transaction_sync`
--> src/test/esplora_indexer_defaults.rs:8:31
src/test/esplora_indexer_defaults.rs enables the import and its three interpolation tests with only #[cfg(feature = "esplora")], while src/ldk_chain_backend/mod.rs exposes transaction_sync only under #[cfg(feature = "transaction-sync")].
Expected result
All targets should compile for the documented block-sync-only combination. Tests that exercise transaction-sync helpers should be excluded when transaction-sync is disabled.
Scope and user impact
This is a developer/CI feature-matrix failure, not a binary installation failure. The README's corresponding command succeeds:
cargo install --locked --path . --no-default-features \
--features block-sync,electrum,esploraThe resulting rgb-lightning-node 0.1.0 binary was produced successfully. The defect prevents checking or testing all targets for that supported feature set.
Relevant source
- Failing import and tests:
rgb-lightning-node/src/test/esplora_indexer_defaults.rs
Lines 7 to 10 in af03c7f
#[cfg(feature = "esplora")] use crate::ldk_chain_backend::transaction_sync::{ estimate_fee_rate_sat_per_kw, interpolate_fee_rate, }; - Module feature gate:
rgb-lightning-node/src/ldk_chain_backend/mod.rs
Lines 3 to 4 in af03c7f
#[cfg(feature = "transaction-sync")] pub(crate) mod transaction_sync; - Documented feature set:
Lines 70 to 79 in af03c7f
### Chain sync support Support for the chain sync backends is behind cargo features, `block-sync` and `transaction-sync` (both enabled by default). At least one of them needs to be enabled. See [Sync modes](#sync-modes) for what each backend does. To support the block-sync backend only: ```sh cargo install --locked --path . --no-default-features --features block-sync,electrum,esplora ```
Duplicate-check evidence
Open and closed issues and PRs in both UTEXO and upstream were searched for esplora_indexer_defaults, block-sync, transaction_sync, --all-targets, and the E0432 text. Issue comments, review comments, and current overlapping PRs were also inspected. PRs #139 and #140 touch the failing test and introduce the currently mismatched gates, but neither contains a fix or discusses this feature-matrix failure. No duplicate or active fix was found. Private maintainer discussions are not visible.
Suggested fix direction
Require both features for the transaction-sync-only imports and interpolation tests, for example #[cfg(all(feature = "esplora", feature = "transaction-sync"))], while leaving default_fee_buckets_populates_all_targets available to block-sync builds. Add this block-sync-only --all-targets combination to the compile matrix.
Activity