Skip to content
This repository was archived by the owner on Jan 9, 2023. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion import.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ async function importTransactionFile(filePath, addressString, defaultPort) {
continue;
}

if (program.timestampCheck && stats.mtimeMs !== file.ts * 1000) {
if (program.timestampCheck && Math.trunc(stats.mtimeMs / 1000) !== file.ts) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch here, this change makes sense. Nice use of trunc instead of floor as well since this will always be positive, you get a slight performance boost. I assume that this wouldn't be run multiple times per seconds for the same file so we shouldn't need to worry about accidentally caching a changed file in the same second?

warns.push(`${file.path} has been modified, skipping`);
continue;
}
Expand Down