-
Notifications
You must be signed in to change notification settings - Fork 16
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
Conversation
Pull Request Test Coverage Report for Build 196
💛 - Coveralls |
src/hbbft_bba.erl
Outdated
@@ -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 |
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.
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}}]}; |
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.
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.
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 and I couldn't find other instances of incorrect ordering.
No description provided.