Skip to content

Commit be36eeb

Browse files
committed
Merge #114: Fix compilation error when using memory database
faa461d Fix compilation error when using memory database (Daniela Brozzoni) Pull request description: This commit also adds the testing for memory database and key value database in CI <!-- You can erase any parts of this template not applicable to your Pull Request. --> ### Description <!-- Describe the purpose of this PR, what's being adding and/or fixed --> ### Notes to the reviewers <!-- In this section you can include notes directed to the reviewers, like explaining why some parts of the PR were done in a specific way --> ### Checklists #### All Submissions: * [x] I've signed all my commits * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk-cli/blob/master/CONTRIBUTING.md) * [x] I ran `cargo fmt` and `cargo clippy` before committing #### Bugfixes: * [ ] This pull request breaks the existing API * [x] I've added tests to reproduce the issue which are now passing * [ ] I'm linking the issue being fixed by this PR ACKs for top commit: notmandatory: ACK faa461d Tree-SHA512: 6e841b0e7cc73145a27ba18ff5e02d08cf1c716cf4b12c46831642bbc26a4d3a411905e765a16b22137654e3d6451492ecea9a5c76a4a9949e574d60f7971475
2 parents d8e93ab + faa461d commit be36eeb

File tree

2 files changed

+16
-11
lines changed

2 files changed

+16
-11
lines changed

.github/workflows/cont_integration.yml

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,19 @@ jobs:
1414
- 1.56.0 # MSRV
1515
features:
1616
- default
17+
- electrum,sqlite-db
18+
- electrum,key-value-db
1719
- electrum
18-
- esplora-ureq
19-
- esplora-reqwest
20-
- compiler
21-
- compact_filters
22-
- rpc
23-
- reserves,electrum
24-
- electrum,verify
20+
- esplora-ureq,sqlite-db
21+
- esplora-reqwest,sqlite-db
22+
- compiler,sqlite-db
23+
- compact_filters,sqlite-db
24+
- rpc,sqlite-db
25+
- reserves,electrum,sqlite-db
26+
- electrum,verify,sqlite-db
2527
# regtest-* features are experimental and not fully usable
26-
- regtest-bitcoin
27-
- regtest-electrum
28+
- regtest-bitcoin,sqlite-db
29+
- regtest-electrum,sqlite-db
2830

2931
steps:
3032
- name: Checkout
@@ -47,11 +49,11 @@ jobs:
4749
override: true
4850
components: rustfmt, clippy
4951
- name: Build
50-
run: cargo build --features ${{ matrix.features }} --locked
52+
run: cargo build --no-default-features --features repl,${{ matrix.features }} --locked
5153
- name: Clippy
5254
run: cargo clippy -- -D warnings
5355
- name: Test
54-
run: cargo test --features ${{ matrix.features }}
56+
run: cargo test --no-default-features --features repl,${{ matrix.features }}
5557

5658
fmt:
5759
name: Rust fmt

src/utils.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,9 @@ pub(crate) fn open_database(wallet_opts: &WalletOpts) -> Result<AnyDatabase, Err
183183
.into_string()
184184
.expect("path string"),
185185
});
186+
#[cfg(not(any(feature = "key-value-db", feature = "sqlite-db")))]
187+
let config = AnyDatabaseConfig::Memory(());
188+
186189
let database = AnyDatabase::from_config(&config)?;
187190
log::debug!("database opened successfully");
188191
Ok(database)

0 commit comments

Comments
 (0)