Skip to content

test(bitcoind_rpc): add regtest coverage for filter_iter example - #2329

Open
visawestern wants to merge 1 commit into
bitcoindevkit:masterfrom
visawestern:test-cli-examples-regtest-1618
Open

visawestern wants to merge 1 commit into
bitcoindevkit:masterfrom
visawestern:test-cli-examples-regtest-1618

Conversation

@visawestern

Copy link
Copy Markdown

Runs the filter_iter example path in CI against a regtest node.

What:

  • New crates/bitcoind_rpc/tests/test_example_regtest.rs: TestEnv with -blockfilterindex=1 -peerblockfilters=1, matures coinbase with 101 blocks, funds a watched regtest address with Amount::from_sat(5_000_000), checks unconfirmed (minconf 0) / confirmed (minconf 1) balances with typed asserts, then drives FilterIter from genesis and asserts only the funding height matches.
  • crates/bitcoind_rpc/Cargo.toml: bdk_testenv with explicit features = ["download"] so the bitcoind binary is available in CI.
  • .github/workflows/cont_integration.yml: new regtest-bitcoind-rpc-example job (cargo test --all-features --test test_example_regtest).

Tests:

  • cargo test -p bdk_bitcoind_rpc --all-features --test test_example_regtest — 1 passed
  • cargo test -p bdk_bitcoind_rpc --all-features --test test_filter_iter — 4 passed
  • cargo fmt --all -- --check — pass
  • cargo clippy -p bdk_bitcoind_rpc --all-targets --all-features -- -D warnings — pass

Closes #1618.

Run the filter_iter example path in CI against a regtest node via
TestEnv with compact block filters enabled. Matures coinbase (101
blocks), funds a watched regtest address with Amount::from_sat, checks
unconfirmed/confirmed balances with typed asserts, then drives
FilterIter from genesis and asserts only the funding height matches.

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

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

Test CLI examples using a regtest node in CI

1 participant