]> Untitled Git - bdk/commit
feat(testenv): add `persist_test_utils` for testing persistence backends
authorcodingp110 <codingp110@gmail.com>
Sun, 18 Oct 2026 14:21:06 +0000 (01:21 +1100)
committer志宇 <hello@evanlinjin.me>
Sun, 18 Oct 2026 14:21:06 +0000 (01:21 +1100)
commit73dc5cd3815c57aa80773d48131e2f88143adc68
tree1d3d9e973cacc81fbfdd7c05dca245c014f88598
parent841b427e6217b794051ff57ebc4f514dffa5f426
feat(testenv): add `persist_test_utils` for testing persistence backends

`assert_persist_changesets` persists each changeset in turn, checks that
loading returns their aggregate, then reopens the store and checks again.
It panics on any mismatch or backend error.

Also add `utils` helpers that build non-empty `tx_graph`,
`keychain_txout` and `local_chain` changesets, and a `miniscript`
feature (on by default) that the keychain changeset needs.

Co-Authored-By: 志宇 <hello@evanlinjin.me>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
crates/testenv/Cargo.toml
crates/testenv/src/lib.rs
crates/testenv/src/persist_test_utils.rs [new file with mode: 0644]
crates/testenv/src/utils.rs