Skip to content

Commit

Permalink
fix another badmatch error when inputting bba
Browse files Browse the repository at this point in the history
  • Loading branch information
Rahul Garg committed Jun 29, 2018
1 parent 5bd80c1 commit 63eff0b
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/hbbft_acs.erl
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,13 @@ handle_msg(Data, J, {{rbc, I}, RBCMsg}) ->
false ->
%% ok, start the BBA for this RBC
BBA = get_bba(NewData, I),
{NewBBA, {send, ToSend}} = hbbft_bba:input(BBA#bba_state.bba_data, 1),
{store_bba_input(store_bba_state(NewData, I, NewBBA), I, 1),
{send, hbbft_utils:wrap({bba, I}, ToSend)}}
case hbbft_bba:input(BBA#bba_state.bba_data, 1) of
{DoneBBA, ok} ->
{store_bba_state(NewData, I, DoneBBA), ok};
{NewBBA, {send, ToSend}} ->
{store_bba_input(store_bba_state(NewData, I, NewBBA), I, 1),
{send, hbbft_utils:wrap({bba, I}, ToSend)}}
end
end;
{NewRBC, ok} ->
{store_rbc_state(Data, I, NewRBC), ok}
Expand Down

0 comments on commit 63eff0b

Please sign in to comment.