import * as Shardus from '../shardus/shardus-types'; import { StateManager as StateManagerTypes } from '@shardeum-foundation/lib-types'; import { SimpleRange, QueueEntry } from './state-manager-types'; import AccountSync from './AccountSync'; import { P2PModuleContext as P2P } from '../p2p/Context'; import DataSourceHelper from './DataSourceHelper'; export interface SyncTrackerInterface { syncStarted: boolean; syncFinished: boolean; range: StateManagerTypes.shardFunctionTypes.BasicAddressRange; queueEntries: QueueEntry[]; isGlobalSyncTracker: boolean; globalAddressMap: { [address: string]: boolean; }; isPartOfInitialSync: boolean; keys: { [address: string]: boolean; }; initByRange(accountSync: AccountSync, p2p: P2P, index: number, range: StateManagerTypes.shardFunctionTypes.BasicAddressRange, cycle: number, initalSync?: boolean): void; initGlobal(accountSync: AccountSync, p2p: P2P, index: number, cycle: number, initalSync?: boolean): void; syncStateDataForRange2(): Promise; syncStateDataGlobals(): Promise; } export default class NodeSyncTracker implements SyncTrackerInterface { accountSync: AccountSync; p2p: P2P; syncStarted: boolean; syncFinished: boolean; range: StateManagerTypes.shardFunctionTypes.BasicAddressRange; cycle: number; index: number; queueEntries: QueueEntry[]; isGlobalSyncTracker: boolean; globalAddressMap: { [address: string]: boolean; }; isPartOfInitialSync: boolean; keys: { [address: string]: boolean; }; dataSourceHelper: DataSourceHelper; currentRange: SimpleRange; addressRange: SimpleRange; combinedAccountData: Shardus.WrappedData[]; accountsWithStateConflict: Shardus.WrappedData[]; failedAccounts: string[]; missingAccountData: string[]; mapAccountData: { [accountID: string]: Shardus.WrappedData; }; combinedAccountStateData: Shardus.StateTableObject[]; partitionStartTimeStamp: number; restartCount: number; reset(): void; initByRange(accountSync: AccountSync, p2p: P2P, index: number, range: StateManagerTypes.shardFunctionTypes.BasicAddressRange, cycle: number, initalSync?: boolean): void; initGlobal(accountSync: AccountSync, p2p: P2P, index: number, cycle: number, initalSync?: boolean): void; /*** * ###### ## ## ## ## ###### ###### ######## ### ######## ######## ######## ### ######## ### ######## ####### ######## ######## ### ## ## ###### ######## * ## ## ## ## ### ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ### ## ## ## ## * ## #### #### ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## #### ## ## ## * ###### ## ## ## ## ## ###### ## ## ## ## ###### ## ## ## ## ## ## ## ###### ## ## ######## ######## ## ## ## ## ## ## #### ###### * ## ## ## #### ## ## ## ######### ## ## ## ## ######### ## ######### ## ## ## ## ## ## ## ######### ## #### ## ## ## * ## ## ## ## ### ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ### ## ## ## * ###### ## ## ## ###### ###### ## ## ## ## ######## ######## ## ## ## ## ## ## ####### ## ## ## ## ## ## ## ## ###### ######## */ syncStateDataForRange2(): Promise; /*** * ###### ## ## ## ## ###### ###### ######## ### ######## ######## ######## ### ######## ### ###### ## ####### ######## ### ## ###### * ## ## ## ## ### ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## * ## #### #### ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## * ###### ## ## ## ## ## ###### ## ## ## ## ###### ## ## ## ## ## ## ## ## #### ## ## ## ######## ## ## ## ###### * ## ## ## #### ## ## ## ######### ## ## ## ## ######### ## ######### ## ## ## ## ## ## ## ######### ## ## * ## ## ## ## ### ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## * ###### ## ## ## ###### ###### ## ## ## ## ######## ######## ## ## ## ## ## ###### ######## ####### ######## ## ## ######## ###### */ /** * syncStateDataGlobals * @param syncTracker */ syncStateDataGlobals(): Promise; syncAccountData2(lowAddress: string, highAddress: string): Promise; processAccountDataNoStateTable2(): Promise; tryRetry(message: string): Promise; }