Skip to content
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

Merged
merged 22 commits into from
Mar 6, 2019
Merged

Update consensus up to spec version 0.4.0 #98

merged 22 commits into from
Mar 6, 2019

Conversation

mkalinin
Copy link
Contributor

@mkalinin mkalinin commented Mar 5, 2019

What's done

Consensus module with all the references is updated to version 0.4.0 of the spec.

@mkalinin mkalinin requested review from zilm13 and Nashatyrev March 5, 2019 07:53
Copy link
Member

@zilm13 zilm13 left a comment

Choose a reason for hiding this comment

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

Looks good!

for (Transfer t1 : transfers) {
for (Transfer t2 : transfers) {
if (t1.equals(t2)) {
return failedResult("two equal transfers have been found");
Copy link
Contributor

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] ?

Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hah! nice catch

@Nashatyrev Nashatyrev requested a review from zilm13 March 5, 2019 17:49
@mkalinin mkalinin requested a review from Nashatyrev March 6, 2019 08:33
@mkalinin mkalinin merged commit 77490de into master Mar 6, 2019
@mkalinin mkalinin deleted the spec/0.4.0 branch March 6, 2019 08:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants