]> Untitled Git - bdk/commit
refactor(test): move tx test utils to testenv
authorVihiga Tyonum <withtvpeter@gmail.com>
Sat, 14 Sep 2024 20:52:50 +0000 (21:52 +0100)
committerVihiga Tyonum <withtvpeter@gmail.com>
Thu, 3 Oct 2024 12:12:32 +0000 (13:12 +0100)
commit88a8403707038264251b3e7fa18b8f21af8646ff
tree36b45c431e435fff07be6cf418e336de43e35754
parentec7342d80775408fec68adb3da4816bd62efcf15
refactor(test): move tx test utils to testenv

- add `utils` mod to testenv crate to keep all
utilities moved from `crates/chain/test/common`
- replace all test tx macros in `chain` crate with
import from `testenv` crate
    - tests/test_indexed_tx_graph
    - tests/test_keychain_txout_index
    - tests/test_local_chain
    - tests/test_tx_graph
    - tests/test_tx_graph_conflicts
- deleted all moved macros and functions in
`crates/chain/test/common/mod`
- replace `bitcoin` external crate with
`bd_chain::bitcoin`
- move `DESCRIPTORS` sample array to `utils` for
other crates to use
- rename h! macro to hash! for clarity
- rename localchain! macro parameter from
'block_hash' to 'hash'

[Ticket: #1602]
13 files changed:
crates/chain/Cargo.toml
crates/chain/tests/common/mod.rs
crates/chain/tests/common/tx_template.rs
crates/chain/tests/test_indexed_tx_graph.rs
crates/chain/tests/test_keychain_txout_index.rs
crates/chain/tests/test_local_chain.rs
crates/chain/tests/test_tx_graph.rs
crates/chain/tests/test_tx_graph_conflicts.rs
crates/core/Cargo.toml
crates/core/tests/common.rs [deleted file]
crates/core/tests/test_checkpoint.rs
crates/testenv/src/lib.rs
crates/testenv/src/utils.rs [new file with mode: 0644]