Skip to content

Move TxTemplate to bdk_testenv (#1936)#2191

Closed
code-orange-dev wants to merge 1 commit intobitcoindevkit:masterfrom
code-orange-dev:fix/1936-txtemplate-to-testenv
Closed

Move TxTemplate to bdk_testenv (#1936)#2191
code-orange-dev wants to merge 1 commit intobitcoindevkit:masterfrom
code-orange-dev:fix/1936-txtemplate-to-testenv

Conversation

@code-orange-dev
Copy link
Copy Markdown

Summary

Moves TxTemplate from crates/chain/tests/common/mod.rs to bdk_testenv for broader reuse.

Changes

  • New tx_template module in bdk_testenv
  • TxTemplate with Cow<'static, T> support
  • init_graph() helper function

Testing

  • Unit tests added
  • Existing tests updated
  • Benchmarks verified

Fixes #1936


🍊 Contributed via Code Orange Dev School

Move TxTemplate types from chain/tests to bdk_testenv crate.
This allows reuse in benchmarks and other test contexts.

- Add TxTemplate struct with Cow<'static, T> for flexibility
- Add init_graph helper function
- Support both owned and borrowed transactions

Relates-to: bitcoindevkit#1936
@luisschwab
Copy link
Copy Markdown
Member

Duplicate of #2177

@luisschwab luisschwab marked this as a duplicate of #2177 Apr 26, 2026
@luisschwab luisschwab closed this Apr 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Move TxTemplate to bdk_testenv and make it better

2 participants