Join GitHub today
Update confirmation height in another thread #1877
Currently the confirmation height is updated on io threads, and if it touches a long chain it can take a very long time (30 minutes) because it can update pretty much the whole ledger. A different approach is now taken. When a block being confirmed, we go down to the lowest block in the chain which has not been confirmed and store each receive block along the way. We now start at the lowest (before it would have been the highest) receive and iterate to the source accounts until we get to a chain where there are no more unconfirmed receives, storing this in a collection of pending writes , working our way from the bottom upwards.