diff --git a/src/hbbft.erl b/src/hbbft.erl index ceac94e..fd6a782 100644 --- a/src/hbbft.erl +++ b/src/hbbft.erl @@ -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