Skip to content

Commit

Permalink
[FOLD] Continue to test non-expanded signer list limits
Browse files Browse the repository at this point in the history
  • Loading branch information
scottschurr committed Mar 24, 2022
1 parent 6fd72f6 commit b176359
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions src/test/app/MultiSign_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -183,13 +183,13 @@ class MultiSign_test : public beast::unit_test::suite
{spook, 1}}),
ter(temBAD_QUORUM));

// clang-format off
// Make a signer list that's too big. Should fail. (Even with
// ExpandedSignerList)
Account const spare("spare", KeyType::secp256k1);
env(signers(
alice,
1,

features[featureExpandedSignerList]
? std::vector<signer>{{bogie, 1}, {demon, 1}, {ghost, 1},
{haunt, 1}, {jinni, 1}, {phase, 1},
Expand All @@ -202,9 +202,11 @@ class MultiSign_test : public beast::unit_test::suite
{acc25, 1}, {acc26, 1}, {acc27, 1},
{acc28, 1}, {acc29, 1}, {acc30, 1},
{acc31, 1}, {acc32, 1}, {acc33, 1}}
: std::vector<
signer>{{bogie, 1}, {demon, 1}, {ghost, 1}, {haunt, 1}, {jinni, 1}, {phase, 1}, {shade, 1}, {spook, 1}, {spare, 1}}),
: std::vector<signer>{{bogie, 1}, {demon, 1}, {ghost, 1},
{haunt, 1}, {jinni, 1}, {phase, 1},
{shade, 1}, {spook, 1}, {spare, 1}}),
ter(temMALFORMED));
// clang-format on
env.close();
env.require(owners(alice, 0));
}
Expand Down Expand Up @@ -1586,11 +1588,11 @@ class MultiSign_test : public beast::unit_test::suite
void
test_signersWithTags(FeatureBitset features)
{
testcase("Signers With Tags");

if (!features[featureExpandedSignerList])
return;

testcase("Signers With Tags");

using namespace jtx;
Env env{*this, features};
Account const alice{"alice", KeyType::ed25519};
Expand Down Expand Up @@ -1688,10 +1690,13 @@ class MultiSign_test : public beast::unit_test::suite
using namespace jtx;
auto const all = supported_amendments();

// The reserve required on a signer list changes based on.
// featureMultiSignReserve. Test both with and without.
testAll(all - featureMultiSignReserve);
testAll(all | featureMultiSignReserve);
// The reserve required on a signer list changes based on
// featureMultiSignReserve. Limits on the number of signers
// changes based on featureExpandedSignerList. Test both with and
// without.
testAll(all - featureMultiSignReserve - featureExpandedSignerList);
testAll(all - featureExpandedSignerList);
testAll(all);
test_amendmentTransition();
}
};
Expand Down

0 comments on commit b176359

Please sign in to comment.