Skip to content

Commit

Permalink
Match sent_txns and rename
Browse files Browse the repository at this point in the history
  • Loading branch information
xandkar committed Feb 23, 2021
1 parent e22abbf commit 8385680
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions test/hbbft_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

-export([all/0, init_per_testcase/2, end_per_testcase/2]).
-export([
txns_limit_test/1,
batch_size_limit_minimal_test/1,
init_test/1,
one_actor_no_txns_test/1,
two_actors_no_txns_test/1,
Expand All @@ -22,7 +22,7 @@

all() ->
[
txns_limit_test,
batch_size_limit_minimal_test,
init_test,
one_actor_no_txns_test,
two_actors_no_txns_test,
Expand All @@ -48,7 +48,9 @@ init_per_testcase(_, Config) ->
end_per_testcase(_, _Config) ->
ok.

txns_limit_test(_) ->
batch_size_limit_minimal_test(_) ->
% Same test goal as one_actor_wrong_batch_size_test, but
% the absolute minimal to test the state transition.
N = 1,
F = 0,
BatchSize = 1,
Expand All @@ -71,7 +73,7 @@ txns_limit_test(_) ->
State_2 = hbbft:abstraction_breaking_set_enc_keys(State_1, #{AcsInstanceId => EncKey}),

% Decoding transactions from ACS, which we expect to be rejectected.
{_State_3, {result, {transactions, [], []}}} =
{State_3, {result, {transactions, [], []}}} =
hbbft:handle_msg(
State_2,
ProtocolInstanceId,
Expand All @@ -80,6 +82,7 @@ txns_limit_test(_) ->
AcsInstanceId,
hbbft_utils:share_to_binary(tpke_privkey:decrypt_share(SK, EncKey))
}),
#{sent_txns := true} = hbbft:status(State_3),
ok.

init_test(Config) ->
Expand Down

0 comments on commit 8385680

Please sign in to comment.