Commit 712a2b5
committed
Merge bitcoin/bitcoin#30817: test: Add coverage for dumptxoutset failure robustness
c2b779d refactor: Manage dumptxoutset RAII classes with std::optional (Fabian Jahr)
4b5bf33 test: Add coverage for failing dumptxoutset behavior (Fabian Jahr)
Pull request description:
This adds a test that checks that network activity is not suspended if dumptxoutset fails in the middle of its process which is implemented with the `NetworkDisable` RAII class. I would have liked to add coverage for the `TemporaryRollback` RAII class but that seems a lot more tricky since the failure needs to happen at some point after the rollback and on the scale of our test chain here I couldn't find a way to do it yet. This was requested by pablomartin4btc here: bitcoin/bitcoin#30808 (review). To test the test you can comment out the content of the destructor of `NetworkDisable`.
It also addresses the feedback by ryanofsky to use `std::optional` instead of `std::unique_ptr` for the management of the RAII object: bitcoin/bitcoin#30808 (comment)
ACKs for top commit:
achow101:
ACK c2b779d
pablomartin4btc:
cr & tACK c2b779d
tdb3:
ACK c2b779d
BrandonOdiwuor:
Code Review ACK c2b779d
theStack:
ACK c2b779d
Tree-SHA512: 9556e75014a2599bb870b70faf887608b332f2312626333f771d4ec11c04f863a2cf17e223ec473d4e8b0c9e8008394a4e0c321561f7ef3a2eec713dcfaea58a2 files changed
+17
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
59 | 60 | | |
60 | 61 | | |
61 | 62 | | |
| |||
2786 | 2787 | | |
2787 | 2788 | | |
2788 | 2789 | | |
2789 | | - | |
2790 | | - | |
| 2790 | + | |
| 2791 | + | |
2791 | 2792 | | |
2792 | 2793 | | |
2793 | 2794 | | |
| |||
2812 | 2813 | | |
2813 | 2814 | | |
2814 | 2815 | | |
2815 | | - | |
| 2816 | + | |
2816 | 2817 | | |
2817 | 2818 | | |
2818 | 2819 | | |
2819 | | - | |
| 2820 | + | |
2820 | 2821 | | |
2821 | 2822 | | |
2822 | 2823 | | |
2823 | 2824 | | |
2824 | 2825 | | |
2825 | | - | |
2826 | | - | |
2827 | 2826 | | |
2828 | 2827 | | |
2829 | 2828 | | |
| |||
2847 | 2846 | | |
2848 | 2847 | | |
2849 | 2848 | | |
2850 | | - | |
| 2849 | + | |
2851 | 2850 | | |
2852 | 2851 | | |
2853 | 2852 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
63 | 73 | | |
64 | 74 | | |
65 | 75 | | |
0 commit comments