Commit f69eab6
committed
Merge #1477: feat(wallet): add transactions_sort_by function
83a0247 feat(wallet): add transactions_sort_by function (Steve Myers)
Pull request description:
### Description
Added new type alias `WalletTx` which represents a `CanonicalTx<'a, Arc<Transaction>, ConfirmationTimeHeightAnchor>` and new `Wallet::transactions_sort_by` that returns a `Vec<WalletTx>` sorted by the given compare function.
### Notes to the reviewers
fixes #794
### Changelog notice
* Add new type alias `WalletTx` which represents a `CanonicalTx<'a, Arc<Transaction>, ConfirmationTimeHeightAnchor>`.
* Add `Wallet::transactions_sort_by()` that returns a `Vec<WalletTx>` sorted by a given compare function.
### 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
#### New Features:
* [x] I've added tests for the new feature
* [x] I've added docs for the new feature
Top commit has no ACKs.
Tree-SHA512: 5758b5edf8200b5534b7a7f538de640e85083bed3da2585109190f0efda3e238f5483d4a2dc073dc4b907644f58b7158a922ebe09d03a47201030162d4b0f4d32 files changed
Lines changed: 50 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
| |||
291 | 292 | | |
292 | 293 | | |
293 | 294 | | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
294 | 298 | | |
295 | 299 | | |
296 | 300 | | |
| |||
1002 | 1006 | | |
1003 | 1007 | | |
1004 | 1008 | | |
1005 | | - | |
| 1009 | + | |
1006 | 1010 | | |
1007 | | - | |
| 1011 | + | |
1008 | 1012 | | |
1009 | 1013 | | |
1010 | 1014 | | |
| |||
1018 | 1022 | | |
1019 | 1023 | | |
1020 | 1024 | | |
1021 | | - | |
| 1025 | + | |
1022 | 1026 | | |
1023 | 1027 | | |
1024 | | - | |
| 1028 | + | |
1025 | 1029 | | |
1026 | 1030 | | |
1027 | | - | |
| 1031 | + | |
1028 | 1032 | | |
1029 | 1033 | | |
1030 | 1034 | | |
1031 | 1035 | | |
1032 | 1036 | | |
1033 | 1037 | | |
1034 | 1038 | | |
1035 | | - | |
| 1039 | + | |
1036 | 1040 | | |
1037 | 1041 | | |
1038 | 1042 | | |
| |||
1045 | 1049 | | |
1046 | 1050 | | |
1047 | 1051 | | |
1048 | | - | |
1049 | | - | |
1050 | | - | |
1051 | | - | |
| 1052 | + | |
1052 | 1053 | | |
1053 | 1054 | | |
1054 | | - | |
| 1055 | + | |
1055 | 1056 | | |
1056 | 1057 | | |
1057 | 1058 | | |
| |||
1102 | 1103 | | |
1103 | 1104 | | |
1104 | 1105 | | |
1105 | | - | |
1106 | | - | |
1107 | | - | |
| 1106 | + | |
1108 | 1107 | | |
1109 | 1108 | | |
1110 | 1109 | | |
1111 | 1110 | | |
1112 | 1111 | | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
| 1126 | + | |
| 1127 | + | |
| 1128 | + | |
| 1129 | + | |
| 1130 | + | |
| 1131 | + | |
| 1132 | + | |
1113 | 1133 | | |
1114 | 1134 | | |
1115 | 1135 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
4203 | 4203 | | |
4204 | 4204 | | |
4205 | 4205 | | |
| 4206 | + | |
| 4207 | + | |
| 4208 | + | |
| 4209 | + | |
| 4210 | + | |
| 4211 | + | |
| 4212 | + | |
| 4213 | + | |
| 4214 | + | |
| 4215 | + | |
| 4216 | + | |
| 4217 | + | |
| 4218 | + | |
| 4219 | + | |
| 4220 | + | |
0 commit comments