Skip to content

Commit 2da0a21

Browse files
author
Marcin Mazurek
committed
[DDW-1088] Ensure file is read from beginning, remove logic that marked previous sync steps as complete when 100% was not seen in logs
1 parent 4894005 commit 2da0a21

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

source/main/utils/handleCheckBlockReplayProgress.ts

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -68,21 +68,6 @@ const createHandleNewLogLine = (mainWindow: BrowserWindow) => {
6868
return;
6969
}
7070

71-
// In rare cases cardano-node does not log 100%, therefore we need to manually mark the previous step as complete.
72-
if (
73-
type === BlockSyncType.replayedBlock &&
74-
progressReport[BlockSyncType.validatingChunk] !== 100
75-
) {
76-
progressReport[BlockSyncType.validatingChunk] = 100;
77-
}
78-
79-
if (
80-
type === BlockSyncType.pushingLedger &&
81-
progressReport[BlockSyncType.replayedBlock] !== 100
82-
) {
83-
progressReport[BlockSyncType.replayedBlock] = 100;
84-
}
85-
8671
const progress = Math.floor(parseFloat(unparsedProgress));
8772

8873
if (progressReport[type] !== progress) {
@@ -105,6 +90,7 @@ const watchLogFile = ({
10590
// https://github.com/lucagrulla/node-tail/issues/137
10691
// https://nodejs.org/dist/latest-v14.x/docs/api/fs.html#fs_caveats
10792
useWatchFile: environment.isWindows,
93+
fromBeginning: true,
10894
});
10995

11096
const handleNewLogLine = createHandleNewLogLine(mainWindow);

0 commit comments

Comments
 (0)