Commit c96523c
committed
3051b3e primitives: Refactor `WitnessEncoder` to use CompactSizeEncoder (jrakibi)
982a805 consensus_encoding: Export `CompactSizeEncoder` (jrakibi)
aa00732 consensus_encoding: Add `CompactSizeEncoder` implementation (jrakibi)
Pull request description:
Add `CompactSizeEncoder` implementation and simplify `WitnessEncoder` by using the new `CompactSizeEncoder` + `Encoder2` composition.
Discussed in: rust-bitcoin#4992 (comment)
Closes: rust-bitcoin#5077
ACKs for top commit:
nyonson:
ACK 3051b3e
apoelstra:
ACK 3051b3e; successfully ran local tests
tcharding:
ACK 3051b3e
Tree-SHA512: f74cd5aec981e902b6ae62ffd43a70145ac6dcbc48182e7062abf40010f49af4ee6313ad8ea69447a9d4b2b43b07d9d896892a22ab521847328c16d94b5f588e
File tree
3 files changed
+70
-35
lines changed- consensus_encoding/src
- encode
- primitives/src
3 files changed
+70
-35
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
250 | 250 | | |
251 | 251 | | |
252 | 252 | | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
253 | 274 | | |
254 | 275 | | |
255 | 276 | | |
| |||
651 | 672 | | |
652 | 673 | | |
653 | 674 | | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
654 | 713 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
| 45 | + | |
45 | 46 | | |
46 | 47 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | 15 | | |
17 | 16 | | |
18 | 17 | | |
| |||
262 | 261 | | |
263 | 262 | | |
264 | 263 | | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | 264 | | |
269 | | - | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
| 265 | + | |
278 | 266 | | |
279 | 267 | | |
280 | 268 | | |
| |||
283 | 271 | | |
284 | 272 | | |
285 | 273 | | |
286 | | - | |
287 | | - | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
288 | 277 | | |
289 | | - | |
| 278 | + | |
290 | 279 | | |
291 | 280 | | |
292 | 281 | | |
293 | 282 | | |
294 | 283 | | |
295 | | - | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | | - | |
301 | | - | |
| 284 | + | |
302 | 285 | | |
303 | 286 | | |
304 | | - | |
305 | | - | |
306 | | - | |
307 | | - | |
308 | | - | |
309 | | - | |
310 | | - | |
311 | | - | |
312 | | - | |
| 287 | + | |
313 | 288 | | |
314 | 289 | | |
315 | 290 | | |
| |||
0 commit comments