Skip to content

Commit

Permalink
Actually append to the transaction buffer, don't prepend
Browse files Browse the repository at this point in the history
  • Loading branch information
Vagabond committed Feb 7, 2019
1 parent 2dbd43b commit 9c83e89
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/hbbft.erl
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ start_on_demand(Data) ->
-spec input(hbbft_data(), binary()) -> {hbbft_data(), ok | {send, [rbc_wrapped_output()]} | full}.
input(Data = #hbbft_data{buf=Buf, max_buf=MaxBuf}, Txn) when is_binary(Txn), length(Buf) < MaxBuf->
%% add this txn to the the buffer
NewBuf = [Txn | Buf],
NewBuf = Buf ++ [Txn],
maybe_start_acs(Data#hbbft_data{buf=NewBuf});
input(Data = #hbbft_data{buf=_Buf}, _Txn) when is_binary(_Txn) ->
%% drop the txn
Expand Down

0 comments on commit 9c83e89

Please sign in to comment.