Skip to content

Add functions to test persistence - #2012

Open
110CodingP wants to merge 3 commits into
bitcoindevkit:masterfrom
110CodingP:add_persist_test_utils
Open

Add functions to test persistence#2012
110CodingP wants to merge 3 commits into
bitcoindevkit:masterfrom
110CodingP:add_persist_test_utils

Conversation

@110CodingP

@110CodingP 110CodingP commented Aug 12, 2025

Copy link
Copy Markdown
Contributor

Description

Added basic tests to the testenv for testing custom persistence backends. Partially solves bdk_wallet#14 and might help with bdk_wallet#234.

Notes to the reviewers

An alternative approach could be to create a struct whose methods are these tests but the current approach seems better since these tests are meant to be used as unit tests. For the same reason redundant functions to check persistence of individual fields of the ChangeSets are provided.

Changelog notice

Added
   - `miniscript` feature to testenv which depends on `bdk_chain/miniscript` .
    - functions to testenv to check `ChangeSet`s are persisted and merged `ChangeSet`s are loaded properly ,gated by the `miniscript` and `std` feature flags.
    - tests to `file_store` and `chain` based on utilities added to `testenv`.
 Changed
   - default feature of testenv to also activate `miniscript` feature.

Todo

  • Add docs
  • Add tests to bdk_chain based on testenv utilities

Checklists

All Submissions:

New Features:

  • I've added tests for the new feature
  • I've added docs for the new feature

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

Labels

new feature New feature or request tests

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

8 participants