Commit c1d82ac
committed
Track block hash, return in
Previously, `Confirm::get_relevant_txids()` returned a list of
transactions that have to be monitored for reorganization out of the
chain. This interface however required a double bookkeeping: while we
internally keep track of the best block, height, etc, it would also
require the user to keep track which transaction was previously
confirmed in which block and to take actions based on any change, e.g,
to reconfirm them when the block would be reorged-out and the
transactions had been reconfirmed in another block.
Here, we track the confirmation block hash internally and return it via
`Confirm::get_relevant_txids()` to the user, which alleviates the
requirement for double bookkeeping: the user can now simply check
whether the given transaction is still confirmed and in the given block,
and take action if not.get_relevant_txids
1 parent fc9a4c2 commit c1d82ac
File tree
7 files changed
+73
-47
lines changed- lightning/src
- chain
- ln
7 files changed
+73
-47
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
544 | 544 | | |
545 | 545 | | |
546 | 546 | | |
547 | | - | |
| 547 | + | |
548 | 548 | | |
549 | 549 | | |
550 | 550 | | |
| |||
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
174 | | - | |
| 174 | + | |
| 175 | + | |
175 | 176 | | |
176 | 177 | | |
177 | 178 | | |
| |||
184 | 185 | | |
185 | 186 | | |
186 | 187 | | |
187 | | - | |
| 188 | + | |
188 | 189 | | |
189 | 190 | | |
190 | 191 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
61 | 62 | | |
62 | 63 | | |
63 | 64 | | |
| |||
92 | 93 | | |
93 | 94 | | |
94 | 95 | | |
| 96 | + | |
95 | 97 | | |
96 | 98 | | |
97 | 99 | | |
| |||
103 | 105 | | |
104 | 106 | | |
105 | 107 | | |
| 108 | + | |
106 | 109 | | |
107 | 110 | | |
108 | 111 | | |
| 112 | + | |
109 | 113 | | |
110 | 114 | | |
111 | 115 | | |
112 | 116 | | |
113 | | - | |
| 117 | + | |
114 | 118 | | |
115 | 119 | | |
116 | 120 | | |
| |||
512 | 516 | | |
513 | 517 | | |
514 | 518 | | |
515 | | - | |
| 519 | + | |
516 | 520 | | |
517 | 521 | | |
518 | 522 | | |
| |||
625 | 629 | | |
626 | 630 | | |
627 | 631 | | |
| 632 | + | |
628 | 633 | | |
629 | 634 | | |
630 | 635 | | |
| |||
665 | 670 | | |
666 | 671 | | |
667 | 672 | | |
| 673 | + | |
668 | 674 | | |
669 | 675 | | |
670 | 676 | | |
| |||
824 | 830 | | |
825 | 831 | | |
826 | 832 | | |
827 | | - | |
828 | | - | |
| 833 | + | |
| 834 | + | |
829 | 835 | | |
830 | | - | |
| 836 | + | |
831 | 837 | | |
832 | 838 | | |
833 | 839 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4513 | 4513 | | |
4514 | 4514 | | |
4515 | 4515 | | |
| 4516 | + | |
| 4517 | + | |
| 4518 | + | |
| 4519 | + | |
| 4520 | + | |
4516 | 4521 | | |
4517 | 4522 | | |
4518 | 4523 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5759 | 5759 | | |
5760 | 5760 | | |
5761 | 5761 | | |
5762 | | - | |
| 5762 | + | |
5763 | 5763 | | |
5764 | 5764 | | |
5765 | 5765 | | |
5766 | | - | |
5767 | | - | |
| 5766 | + | |
| 5767 | + | |
5768 | 5768 | | |
5769 | 5769 | | |
5770 | 5770 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
281 | 281 | | |
282 | 282 | | |
283 | 283 | | |
284 | | - | |
285 | | - | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
286 | 287 | | |
287 | 288 | | |
288 | 289 | | |
| |||
350 | 351 | | |
351 | 352 | | |
352 | 353 | | |
353 | | - | |
354 | | - | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
355 | 357 | | |
356 | 358 | | |
357 | 359 | | |
| |||
0 commit comments