Добавить startup recovery для resync цепочек

This commit is contained in:
AidarKC
2026-06-26 15:51:52 +04:00
parent be4f76834a
commit c048347f2e
8 changed files with 256 additions and 19 deletions
@@ -6,6 +6,7 @@ import org.eclipse.jetty.websocket.server.config.JettyWebSocketServletContainerI
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import server.debug.DebugApiConfigurator;
import server.sync.BlockchainResyncRecoveryOnStartup;
import server.sync.PeriodicBlockchainSyncService;
import server.sync.SyncServersBootstrapService;
import utils.config.AppConfig;
@@ -38,6 +39,16 @@ public final class WsServer {
throw e; // останавливаем запуск
}
// ============================================================
// 0.1) Восстановление цепочек, зависших на full resync
// ============================================================
try {
BlockchainResyncRecoveryOnStartup.runRecoveryOrThrow();
} catch (Exception e) {
log.error("❌ Сервер НЕ будет запущен: критическая ошибка восстановления blockchain resync-маркеров.", e);
throw e;
}
// ============================================================
// 1) Настройки порта
// ============================================================