Open
Description
Context
The TxTemplate
stuff currently resides in crates/chain/tests/common/mod.rs
, making it only accessible for bdk_chain
tests residing in the tests
dir.
However, building a TxGraph
from TxTemplate
s are useful elsewhere (such as for benchmarks as I've discovered while working on #1670 - more on this later).
Proposal
- Move
TxTemplate
types and logic tobdk_testenv
. - Use
Cow<'static, B>
for struct fields andinit_graph
inputs. This allows us to be more flexible when creating templates (they can be owned and returned by methods and manipulated later on). - Redo the benchmarks introduced by Introduce
O(n)
canonicalization algorithm #1670 usingTxTemplate
. - Come up with helper methods to make the work in
3.
easier.
Dependencies
This should be done after #1670 is merged to avoid merge conflicts.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
In Progress