-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/revision tracking #41
base: master
Are you sure you want to change the base?
Conversation
JH456
commented
Dec 31, 2018
- Uses a baby blockchain to track details about each file revision (copy/pastes from other files and timestamps)
- Breaks backwards compatibility with older versions (i.e you can't open up old .sim files with this version. Need to copy the file contents into a new file)
Co-Authored-By: JH456 <[email protected]>
Co-Authored-By: JH456 <[email protected]>
String decodedBlock = new String(Base64.getDecoder().decode(stringifiedBlock.getBytes())); | ||
String[] fields = decodedBlock.split("\t"); | ||
if (fields.length < 4) { | ||
throw new NullPointerException("File is corrupted. Contact Course Staff for Assistance."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like "Contact course staff for assistance" because I want to keep course-specific content out of this. Perhaps: "File hash mismatch: file is corrupted."
return parse(readFile(file)); | ||
CircuitFile savedFile = parse(readFile(file)); | ||
if (!savedFile.revisionSignaturesAreValid()) { | ||
throw new NullPointerException("File is corrupted. Contact Course Staff for Assistance."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto
I reviewed these changes years ago but apparently my comments never actually went out for review, they were pending this whole time /facepalm |