-
Notifications
You must be signed in to change notification settings - Fork 9
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
Update consensus up to spec version 0.4.0 #98
Conversation
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.
Looks good!
core/src/main/java/org/ethereum/beacon/core/operations/Transfer.java
Outdated
Show resolved
Hide resolved
for (Transfer t1 : transfers) { | ||
for (Transfer t2 : transfers) { | ||
if (t1.equals(t2)) { | ||
return failedResult("two equal transfers have been found"); |
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.
Hm, shouldn't that immediately fail on the first iteration when t1 == transfers[0], t2 == transfers[0]
?
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.
M.b. something like this:
if (new HashSet(transfers).size() != transfers.size()) // fail
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.
hah! nice catch
…r.java Co-Authored-By: mkalinin <[email protected]>
What's done
Consensus module with all the references is updated to version 0.4.0 of the spec.