Commit 6123778
committed
Merge #1523: bdk_wallet: Don't reimplement descriptor checksum, use the one from rust-miniscript
70c7d6b bdk_wallet: remove unnecessary calls to calc_checksum (Antoine Poinsot)
8245fb7 bdk_wallet: don't reimplement checksum algorithm, use rust-miniscript (Antoine Poinsot)
a11ace2 bdk_wallet: descriptor: remove unnecessary call to calc_checksum_bytes (Antoine Poinsot)
Pull request description:
Skimming through the BDK code today i noticed the descriptor checksum algorithm is re-implemented instead of using the implementation from rust-miniscript. Re-implementing it here is more code to review and maintain, more room for mistakes and overall less eyes over the code than centralizing a single implementation over at `rust-miniscript`.
While doing this i noticed that one of the variants was completely unnecessary (`calc_checksum_bytes`), so i removed it. I realise it's breaking the API, so if we want to avoid that i can remove this part. I also added a commit to remove redundant calls to `calc_checsum`.
Overall this is just a quick PoC as i noticed it i figured i'd send a PR, my bad if i missed anything!
ACKs for top commit:
storopoli:
utACK 70c7d6b
evanlinjin:
ACK 70c7d6b
Tree-SHA512: 89d0e582979c8260a97646abc3821a9ec1fd84b5ff1e9236efa87654bd31d5da654c9725f4e1c9871a28c9312c0cfe6e095e50742abe5fbd0490fc9a2e41c86b3 files changed
+15
-80
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | | - | |
| 20 | + | |
22 | 21 | | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
| 22 | + | |
| 23 | + | |
52 | 24 | | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
85 | 28 | | |
86 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
87 | 33 | | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | 34 | | |
97 | 35 | | |
98 | 36 | | |
| |||
141 | 79 | | |
142 | 80 | | |
143 | 81 | | |
144 | | - | |
| 82 | + | |
145 | 83 | | |
146 | 84 | | |
147 | 85 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
46 | 45 | | |
47 | 46 | | |
48 | 47 | | |
| |||
88 | 87 | | |
89 | 88 | | |
90 | 89 | | |
91 | | - | |
92 | | - | |
| 90 | + | |
| 91 | + | |
93 | 92 | | |
94 | 93 | | |
95 | 94 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
| 82 | + | |
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| |||
2360 | 2360 | | |
2361 | 2361 | | |
2362 | 2362 | | |
2363 | | - | |
| 2363 | + | |
2364 | 2364 | | |
2365 | 2365 | | |
2366 | 2366 | | |
2367 | 2367 | | |
2368 | 2368 | | |
2369 | | - | |
2370 | | - | |
2371 | | - | |
| 2369 | + | |
2372 | 2370 | | |
2373 | 2371 | | |
2374 | 2372 | | |
| |||
0 commit comments