Skip to content

refactor(tests): move TxTemplate from chain to testenv#2177

Open
tvpeter wants to merge 4 commits intobitcoindevkit:masterfrom
tvpeter:refactor/mv-txtemplate-to-testenv
Open

refactor(tests): move TxTemplate from chain to testenv#2177
tvpeter wants to merge 4 commits intobitcoindevkit:masterfrom
tvpeter:refactor/mv-txtemplate-to-testenv

Conversation

@tvpeter
Copy link
Copy Markdown
Collaborator

@tvpeter tvpeter commented Apr 15, 2026

Description

This PR moves the TxTemplate from the chain crate into the testenv. It also updates the TxTemplate to use the Cow smart pointer, adds method implementations to TxTemplate, and migrates tests to the builder API.

This PR addresses the first and second todos on #1936.

Changelog notice

  • moved TxTemplate from chain to testenv
  • added builder API methods to TxTemplate

Checklists

All Submissions:

Copy link
Copy Markdown
Collaborator

@oleonardolima oleonardolima left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cACK a5d9f41

You can rebase to get the latest toolchain updated CI. Overall looks good, I only would like to take a deeper look into the last commit.

@oleonardolima
Copy link
Copy Markdown
Collaborator

cACK a5d9f41

You can rebase to get the latest toolchain updated CI. Overall looks good, I only would like to take a deeper look into the last commit.

Also, I'd avoid mixing renaming and moving code in the same commits.

tvpeter added 4 commits April 30, 2026 03:57
- move tx_template from chain to testenv
- update imports from chain/common/ to bdk_testenv
/tx_template/
-update TxTemplate struct to use Cow pointer
- add utility methods to TxTemplate
- update test_tx_graph and test_tx_graph_conflicts
to use builder API
@tvpeter tvpeter force-pushed the refactor/mv-txtemplate-to-testenv branch from a5d9f41 to 6d5cac1 Compare April 30, 2026 02:58
@oleonardolima
Copy link
Copy Markdown
Collaborator

@tvpeter Oh, there are some conflicts 😅

@tvpeter
Copy link
Copy Markdown
Collaborator Author

tvpeter commented May 1, 2026

@tvpeter Oh, there are some conflicts 😅

Yeah, from the recent merge. I will rebase and resolve

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

Labels

Projects

Status: Needs Review

Development

Successfully merging this pull request may close these issues.

3 participants