Commit a267589
committed
validation: Don't loop over all chainstates in LoadExternalBlock
This simplifies the code. The only reason to call ActivateBestChain()
here is to allow the main init thread to finish startup in a case of
-reindex. In this situation no second chainstate can exist anyway
because -reindex would have deleted any snapshot chainstate earlier.
This could change behavior slightly if -loadblocks was used when there is a
snapshot chainstate. In this case, there is no reason to call
ActivateBestChain() for that chainstate here - it will be called in
ImportBlocks() after all blocks have been indexed.1 parent 22723c8 commit a267589
1 file changed
+2
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5158 | 5158 | | |
5159 | 5159 | | |
5160 | 5160 | | |
5161 | | - | |
5162 | | - | |
5163 | | - | |
5164 | | - | |
5165 | | - | |
5166 | | - | |
5167 | | - | |
5168 | | - | |
5169 | | - | |
| 5161 | + | |
| 5162 | + | |
5170 | 5163 | | |
5171 | 5164 | | |
5172 | 5165 | | |
| |||
0 commit comments