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

Attempt to ensure messages are output in the correct order #19

Merged
merged 2 commits into from
Jul 11, 2018

Conversation

Vagabond
Copy link
Member

No description provided.

@coveralls
Copy link

coveralls commented Jul 10, 2018

Pull Request Test Coverage Report for Build 196

  • 2 of 2 (100.0%) changed or added relevant lines in 1 file are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage decreased (-0.3%) to 90.934%

Files with Coverage Reduction New Missed Lines %
src/hbbft_bba.erl 1 91.58%
Totals Coverage Status
Change from base Build 192: -0.3%
Covered Lines: 331
Relevant Lines: 364

💛 - Coveralls

@@ -192,7 +192,7 @@ bval(Data=#bba_data{n=N, f=F}, Id, V) ->
%% TODO need more entropy for the SID
%% We have enough AUX and CON messages to reveal our share of the coin
Copy link
Member

Choose a reason for hiding this comment

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

While we're on it could you fix the CON typo to CONF as well please.

@@ -177,7 +177,7 @@ bval(Data=#bba_data{n=N, f=F}, Id, V) ->
true ->
%% XXX How many times do we send AUX per round? I think just once
Random = rand_val(NewData2#bba_data.bin_values),
{NewData2#bba_data{aux_sent = true}, [{multicast, {aux, NewData2#bba_data.round, Random}} | ToSend]};
{NewData2#bba_data{aux_sent = true}, ToSend ++ [{multicast, {aux, NewData2#bba_data.round, Random}}]};
Copy link
Member

Choose a reason for hiding this comment

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

Adding this here for posterity. The messages from the current round should be processed once the previous rounds are done. We were incorrectly appending the message at the head of the list, this ideally fixes it.

Copy link
Member

@vihu vihu 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 and I couldn't find other instances of incorrect ordering.

@vihu vihu merged commit 93d21a8 into master Jul 11, 2018
@vihu vihu deleted the adt/message-ordering branch July 11, 2018 00:19
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.

None yet

3 participants