Commit c9136ca
committed
validation: fix issue with an interrupted -reindex
If a reindex was interrupted while it was iterating
through the block files, genesis will already be connected
when the reindex resumes at the next startup.
In this case, a call to ActivateBestChainState() is not only unnecessary,
but it would connect multiple blocks without applying
-assumevalid, which is much slower.
This is because assumevalid requires us to have a header above
the minimum chainwork, but that header is unknown to us if it's in
a later blockfile not indexed yet.1 parent a267589 commit c9136ca
1 file changed
+7
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5157 | 5157 | | |
5158 | 5158 | | |
5159 | 5159 | | |
5160 | | - | |
| 5160 | + | |
| 5161 | + | |
| 5162 | + | |
| 5163 | + | |
| 5164 | + | |
| 5165 | + | |
| 5166 | + | |
5161 | 5167 | | |
5162 | 5168 | | |
5163 | 5169 | | |
| |||
0 commit comments