You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 TxTemplates 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 to bdk_testenv.
Use Cow<'static, B> for struct fields and init_graph inputs. This allows us to be more flexible when creating templates (they can be owned and returned by methods and manipulated later on).
Context
The
TxTemplate
stuff currently resides incrates/chain/tests/common/mod.rs
, making it only accessible forbdk_chain
tests residing in thetests
dir.However, building a
TxGraph
fromTxTemplate
s are useful elsewhere (such as for benchmarks as I've discovered while working on #1670 - more on this later).Proposal
TxTemplate
types and logic tobdk_testenv
.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).O(n)
canonicalization algorithm #1670 usingTxTemplate
.3.
easier.Dependencies
This should be done after #1670 is merged to avoid merge conflicts.
The text was updated successfully, but these errors were encountered: