Commit 4dfadef
committed
Merge #214: feat(test): add legacy descriptor tests
5dcf128 test: fixup value of P2WPKH_FAKE_PK_SIZE (33) (valued mammal)
833ed78 chore(test): destructure `wallet.sent_and_received()` into `(sent, received)` (Luis Schwab)
9b3eb94 fix(test): `check_fee!` returns `Amount` instead of `Result<Amount>` (Luis Schwab)
b56f4bd fix(test): push P2WPKH's signature and pubkey separately into witness (Luis Schwab)
1b4f31c fix: clippy (Luis Schwab)
4c963d9 test: add `test_legacy_bump_fee_add_input()` (Luis Schwab)
6c2e5a5 test: add `test_legacy_bump_fee_drain_wallet()` (Luis Schwab)
a094c6e test: add `test_legacy_bump_fee_zero_abs()` (Luis Schwab)
19f9095 test: add `test_legacy_create_tx_custom_sighash()` (Luis Schwab)
ba06877 test: add `test_legacy_create_tx_default_sighash()` (Luis Schwab)
2dcf7ad test: add `test_legacy_create_tx_absolute_high_fee()` (Luis Schwab)
cc5ba73 test: add `test_legacy_create_tx_absolute_zero_fee()` (Luis Schwab)
cf0125c test: add `test_legacy_create_tx_absolute_fee()` (Luis Schwab)
a8a0df4 test: add `test_legacy_create_tx_custom_fee_rate()` (Luis Schwab)
73e9b6f test: add `test_legacy_get_funded_wallet_tx_fee_rate()` (Luis Schwab)
a4de9be feat: create `assert_fee_rate_legacy!` macro (Luis Schwab)
5444fe7 test: add `get_test_pkh` (Luis Schwab)
Pull request description:
<!-- You can erase any parts of this template not applicable to your Pull Request. -->
### Description
This PR closes #134 and is a revival of bitcoindevkit/bdk#1130, which adds the following tests:
- `test_legacy_bump_fee_no_change_add_input_and_change()`
- `test_legacy_bump_fee_add_input()`
- `test_legacy_bump_fee_drain_wallet()`
- `test_legacy_bump_fee_zero_abs()`
- `test_legacy_create_tx_custom_sighash()`
- `test_legacy_create_tx_default_sighash()`
- `test_legacy_create_tx_absolute_high_fee()`
- `test_legacy_create_tx_absolute_zero_fee()`
- `test_legacy_create_tx_absolute_fee()`
- `test_legacy_create_tx_custom_fee_rate()`
- `test_legacy_get_funded_wallet_tx_fee_rate()`
### Changelog:
- Add the above mentioned tests.
- Add a new `assert_fee_rate_legacy!` macro for legacy transactions.
- The `check_fee!` macro now returns `Amount` instead of `Result<Amount>`.
- All `wallet.sent_and_received` got destructured to `(sent, received)` instead of `sent_and_received.{0,1}`.
- ~Swap `TweakedKeypair::to_inner()` for `TweakedKeypair::to_keypair()`.~
### Checklists
#### All Submissions:
* [X] I've signed all my commits
* [X] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md)
* [X] I ran `cargo fmt` and `cargo clippy` before committing
ACKs for top commit:
ValuedMammal:
ACK 5dcf128
Tree-SHA512: 4ce84749f6611ee540bd0d161ef22f731b827c9bef80a567977ba954e68bbbd1a93a1eaaf35d91cfc87f82d10ce7a62f2866aeceb5fef87792a18c2f72e2ace72 files changed
+455
-148
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
137 | 142 | | |
138 | 143 | | |
139 | 144 | | |
| |||
0 commit comments