Commit 823691d
committed
refactor(chain)!: migrate from
- Replace `CanonicalView::new()` constructor with internal `CanonicalView::new()` for use by `CanonicalizationTask`
- Remove `TxGraph::try_canonical_view()` and `TxGraph::canonical_view()` methods
- Add `TxGraph::canonicalization_task()` method to create canonicalization tasks
- Add `LocalChain::canonicalize()` method to process tasks and return `CanonicalView`'s
- Update `IndexedTxGraph` to delegate canonicalization to underlying `TxGraph`
The new API separates canonicalization logic from I/O operations:
- Create canonicalization task: `graph.canonicalization_task(params)`
- Execute canonicalization: `chain.canonicalize(task, chain_tip)`
BREAKING CHANGE: Remove `CanonicalView::new()` and `TxGraph::canonical_view()` methods in favor of task-based approachCanonicalIter to CanonicalizationTask
1 parent e125e30 commit 823691d
File tree
20 files changed
+362
-406
lines changed- crates
- bitcoind_rpc
- examples
- tests
- chain
- benches
- src
- tests
- electrum/tests
- esplora/tests
- examples
- example_bitcoind_rpc_polling/src
- example_cli/src
- example_electrum/src
- example_esplora/src
20 files changed
+362
-406
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
| 72 | + | |
| 73 | + | |
73 | 74 | | |
74 | 75 | | |
75 | 76 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
310 | 310 | | |
311 | 311 | | |
312 | 312 | | |
313 | | - | |
314 | | - | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
315 | 318 | | |
316 | 319 | | |
317 | 320 | | |
| |||
616 | 619 | | |
617 | 620 | | |
618 | 621 | | |
619 | | - | |
620 | | - | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
621 | 625 | | |
622 | 626 | | |
623 | 627 | | |
| |||
632 | 636 | | |
633 | 637 | | |
634 | 638 | | |
635 | | - | |
636 | | - | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
637 | 644 | | |
638 | 645 | | |
639 | 646 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
103 | 102 | | |
104 | 103 | | |
105 | 104 | | |
106 | 105 | | |
107 | 106 | | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
113 | 111 | | |
114 | 112 | | |
115 | 113 | | |
116 | 114 | | |
117 | 115 | | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
123 | 120 | | |
124 | 121 | | |
125 | 122 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | | - | |
88 | | - | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
89 | 92 | | |
90 | 93 | | |
91 | 94 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | | - | |
19 | 17 | | |
20 | 18 | | |
21 | 19 | | |
| |||
30 | 28 | | |
31 | 29 | | |
32 | 30 | | |
33 | | - | |
34 | 31 | | |
35 | 32 | | |
36 | 33 | | |
| |||
52 | 49 | | |
53 | 50 | | |
54 | 51 | | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
| 52 | + | |
62 | 53 | | |
63 | 54 | | |
64 | 55 | | |
| |||
80 | 71 | | |
81 | 72 | | |
82 | 73 | | |
83 | | - | |
84 | 74 | | |
85 | 75 | | |
86 | 76 | | |
| |||
96 | 86 | | |
97 | 87 | | |
98 | 88 | | |
99 | | - | |
| 89 | + | |
100 | 90 | | |
101 | 91 | | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
| 92 | + | |
106 | 93 | | |
107 | 94 | | |
108 | 95 | | |
| |||
111 | 98 | | |
112 | 99 | | |
113 | 100 | | |
114 | | - | |
115 | 101 | | |
116 | 102 | | |
117 | 103 | | |
| |||
152 | 138 | | |
153 | 139 | | |
154 | 140 | | |
155 | | - | |
| 141 | + | |
156 | 142 | | |
157 | 143 | | |
158 | 144 | | |
| |||
232 | 218 | | |
233 | 219 | | |
234 | 220 | | |
235 | | - | |
| 221 | + | |
236 | 222 | | |
237 | 223 | | |
238 | 224 | | |
| |||
426 | 412 | | |
427 | 413 | | |
428 | 414 | | |
429 | | - | |
| 415 | + | |
430 | 416 | | |
431 | | - | |
432 | | - | |
433 | | - | |
434 | | - | |
435 | | - | |
436 | | - | |
437 | | - | |
438 | | - | |
439 | | - | |
440 | | - | |
441 | | - | |
442 | | - | |
443 | | - | |
444 | | - | |
445 | | - | |
| 417 | + | |
| 418 | + | |
446 | 419 | | |
447 | 420 | | |
448 | 421 | | |
| |||
0 commit comments