Skip to content

Commit

Permalink
store state for 1
Browse files Browse the repository at this point in the history
  • Loading branch information
birarda committed Aug 20, 2024
1 parent 9e51b5e commit 2831911
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions test/state.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1098,8 +1098,16 @@ class ExternalSenderTest : public StateTest
auto [commit, welcome, new_state] = states[0].commit(
fresh_secret(), CommitOpts{ { add }, true, false, {} }, {});
states[0] = new_state;

silence_unused(commit);
silence_unused(welcome);

states.push_back({ init_privs[1],
leaf_privs[1],
identity_privs[1],
key_packages[1],
welcome,
std::nullopt,
{} });
}

PublicMessage GenerateExternalSenderProposal(const Proposal& proposal)
Expand Down Expand Up @@ -1131,7 +1139,7 @@ TEST_CASE_METHOD(ExternalSenderTest,
// proposal does not throw an exception.

// Add
auto add_proposal = Proposal{ Add{ key_packages[1] } };
auto add_proposal = Proposal{ Add{ key_packages[2] } };
auto ext_add_message = GenerateExternalSenderProposal(add_proposal);

REQUIRE(!states[0].handle(ext_add_message).has_value());
Expand Down

0 comments on commit 2831911

Please sign in to comment.