mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-04-16 07:51:08 +02:00
It seems #5246 introduced a subtle bug that lead to the error "out of order block: expecting height=1, got height=XXX" some times during startup. Apparently it can happen that during pruning of the graph tip some blocks can come in before we start our chain view and the new block subscription. By querying the chain backend for the best height before syncing with the graph we ensure that we never miss a block.