Commit 6a47337
committed
Merge bitcoin/bitcoin#27862: validation: Stricter assumeutxo error handling when renaming chainstates
1c7d08b validation: Stricter assumeutxo error handling in InvalidateCoinsDBOnDisk (Ryan Ofsky)
9047337 validation: Stricter assumeutxo error handling in LoadChainstate (Ryan Ofsky)
Pull request description:
There are two places in assumeutxo code where it is calling `AbortNode` to trigger asynchronous shutdowns without returning errors to calling functions.
One case, in `LoadChainstate`, happens when snapshot validation succeeds, and there is an error trying to replace the background chainstate with the snapshot chainstate.
The other case, in `InvalidateCoinsDBOnDisk`, happens when snapshot validatiion fails, and there is an error trying to remove the snapshot chainstate.
In both cases the node is being forced to shut down, so it makes sense for these functions to raise errors so callers can know that an error happened without having to infer it from the shutdown state.
Noticed these cases while reviewing #27861, which replaces the `AbortNode` function with a `FatalError` function.
ACKs for top commit:
achow101:
ACK 1c7d08b
TheCharlatan:
ACK 1c7d08b
jamesob:
ACK 1c7d08b ([`jamesob/ackr/27862.1.ryanofsky.validation_stricter_assu`](https://github.com/jamesob/bitcoin/tree/ackr/27862.1.ryanofsky.validation_stricter_assu))
Tree-SHA512: fb1dcde3fa0e77b4ba0c48507d289552b939c2866781579c8e994edc209abc3cd29cf81c89380057199323a8eec484956abb1fd3a43c957ecd0e7f7bbfd63fd8File tree
5 files changed
+16
-10
lines changed- src
- node
5 files changed
+16
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1545 | 1545 | | |
1546 | 1546 | | |
1547 | 1547 | | |
1548 | | - | |
| 1548 | + | |
1549 | 1549 | | |
1550 | 1550 | | |
1551 | 1551 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
210 | | - | |
| 210 | + | |
211 | 211 | | |
212 | 212 | | |
213 | 213 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
| 46 | + | |
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5412 | 5412 | | |
5413 | 5413 | | |
5414 | 5414 | | |
5415 | | - | |
| 5415 | + | |
5416 | 5416 | | |
5417 | 5417 | | |
5418 | 5418 | | |
| |||
5425 | 5425 | | |
5426 | 5426 | | |
5427 | 5427 | | |
5428 | | - | |
| 5428 | + | |
| 5429 | + | |
| 5430 | + | |
| 5431 | + | |
5429 | 5432 | | |
5430 | 5433 | | |
5431 | 5434 | | |
| |||
5627 | 5630 | | |
5628 | 5631 | | |
5629 | 5632 | | |
5630 | | - | |
| 5633 | + | |
5631 | 5634 | | |
5632 | 5635 | | |
5633 | 5636 | | |
| |||
5656 | 5659 | | |
5657 | 5660 | | |
5658 | 5661 | | |
5659 | | - | |
| 5662 | + | |
5660 | 5663 | | |
5661 | 5664 | | |
5662 | 5665 | | |
5663 | | - | |
5664 | | - | |
| 5666 | + | |
| 5667 | + | |
5665 | 5668 | | |
| 5669 | + | |
5666 | 5670 | | |
5667 | 5671 | | |
5668 | 5672 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| |||
810 | 811 | | |
811 | 812 | | |
812 | 813 | | |
813 | | - | |
| 814 | + | |
814 | 815 | | |
815 | 816 | | |
816 | 817 | | |
| |||
0 commit comments