If a block is found while a node is batch-synchronizing, it will not be sent as part of the batch-synchronization process. In this case, after synchronization is "complete", the "synchronized" node will be behind until a new block is found. The new block triggers another synchronization process. If the "synchronized" node is mining, it will be mining on top of a chain prefix not on top of the whole thing.
This undesirable behavior occurs only in the context of batch-synchronization. For single-block synchronization there is no problem as far as we know.
[ ] After completing one round of batch-synchronization, query the peer to see if we are synchronized now; and start another round (batch or single as appropriate) if not.
If a block is found while a node is batch-synchronizing, it will not be sent as part of the batch-synchronization process. In this case, after synchronization is "complete", the "synchronized" node will be behind until a new block is found. The new block triggers another synchronization process. If the "synchronized" node is mining, it will be mining on top of a chain prefix not on top of the whole thing.
This undesirable behavior occurs only in the context of batch-synchronization. For single-block synchronization there is no problem as far as we know.