This was suggested by me in the discussion of #30288, which has more context.
If the snapshot is not an ancestor of the most-work header (m_best_header
), syncing from that alternative chain leading to m_best_header
should be prioritised. Therefore it’s not useful loading the snapshot in this situation.
If the other chain turns out to be invalid or the chain with the snapshot retrieves additional headers so that it’s the most-work one again (see functional test), m_best_header
will change and loading the snapshot will be possible again.
Because of the work required to generate a conflicting headers chain, a situation with two conflicting chains should only be possible under extreme circumstances, such as major forks.