This PR addresses an issue where state sync may fail to start if the conditions required for its initiation are not met when a finalized block notification is received. pending_state_sync_attempt is introduced to trigger the state sync later when the conditions are satisfied.
This issue was spotted when I worked on #5406, specifically, queue_blocks was not empty when the finalized block notification was received, and then the state sync was stalled. cc @dmitry-markin
This PR addresses an issue where state sync may fail to start if the conditions required for its initiation are not met when a finalized block notification is received.
pending_state_sync_attempt
is introduced to trigger the state sync later when the conditions are satisfied.This issue was spotted when I worked on #5406, specifically,
queue_blocks
was not empty when the finalized block notification was received, and then the state sync was stalled. cc @dmitry-markin