@@ -63,7 +63,7 @@ class MultiSign_test : public beast::unit_test::suite
63
63
64
64
public:
65
65
void
66
- test_noReserve (FeatureBitset features)
66
+ testNoReserve (FeatureBitset features)
67
67
{
68
68
testcase (" No Reserve" );
69
69
@@ -133,7 +133,7 @@ class MultiSign_test : public beast::unit_test::suite
133
133
}
134
134
135
135
void
136
- test_signerListSet (FeatureBitset features)
136
+ testSignerListSet (FeatureBitset features)
137
137
{
138
138
testcase (" SignerListSet" );
139
139
@@ -215,7 +215,7 @@ class MultiSign_test : public beast::unit_test::suite
215
215
}
216
216
217
217
void
218
- test_phantomSigners (FeatureBitset features)
218
+ testPhantomSigners (FeatureBitset features)
219
219
{
220
220
testcase (" Phantom Signers" );
221
221
@@ -282,7 +282,7 @@ class MultiSign_test : public beast::unit_test::suite
282
282
}
283
283
284
284
void
285
- test_fee (FeatureBitset features)
285
+ testFee (FeatureBitset features)
286
286
{
287
287
testcase (" Fee" );
288
288
@@ -346,7 +346,7 @@ class MultiSign_test : public beast::unit_test::suite
346
346
}
347
347
348
348
void
349
- test_misorderedSigners (FeatureBitset features)
349
+ testMisorderedSigners (FeatureBitset features)
350
350
{
351
351
testcase (" Misordered Signers" );
352
352
@@ -374,7 +374,7 @@ class MultiSign_test : public beast::unit_test::suite
374
374
}
375
375
376
376
void
377
- test_masterSigners (FeatureBitset features)
377
+ testMasterSigners (FeatureBitset features)
378
378
{
379
379
testcase (" Master Signers" );
380
380
@@ -429,7 +429,7 @@ class MultiSign_test : public beast::unit_test::suite
429
429
}
430
430
431
431
void
432
- test_regularSigners (FeatureBitset features)
432
+ testRegularSigners (FeatureBitset features)
433
433
{
434
434
testcase (" Regular Signers" );
435
435
@@ -494,7 +494,7 @@ class MultiSign_test : public beast::unit_test::suite
494
494
}
495
495
496
496
void
497
- test_regularSignersUsingSubmitMulti (FeatureBitset features)
497
+ testRegularSignersUsingSubmitMulti (FeatureBitset features)
498
498
{
499
499
testcase (" Regular Signers Using submit_multisigned" );
500
500
@@ -734,7 +734,7 @@ class MultiSign_test : public beast::unit_test::suite
734
734
}
735
735
736
736
void
737
- test_heterogeneousSigners (FeatureBitset features)
737
+ testHeterogeneousSigners (FeatureBitset features)
738
738
{
739
739
testcase (" Heterogenious Signers" );
740
740
@@ -881,7 +881,7 @@ class MultiSign_test : public beast::unit_test::suite
881
881
// We want to always leave an account signable. Make sure the that we
882
882
// disallow removing the last way a transaction may be signed.
883
883
void
884
- test_keyDisable (FeatureBitset features)
884
+ testKeyDisable (FeatureBitset features)
885
885
{
886
886
testcase (" Key Disable" );
887
887
@@ -963,7 +963,7 @@ class MultiSign_test : public beast::unit_test::suite
963
963
// Verify that the first regular key can be made for free using the
964
964
// master key, but not when multisigning.
965
965
void
966
- test_regKey (FeatureBitset features)
966
+ testRegKey (FeatureBitset features)
967
967
{
968
968
testcase (" Regular Key" );
969
969
@@ -1000,7 +1000,7 @@ class MultiSign_test : public beast::unit_test::suite
1000
1000
1001
1001
// See if every kind of transaction can be successfully multi-signed.
1002
1002
void
1003
- test_txTypes (FeatureBitset features)
1003
+ testTxTypes (FeatureBitset features)
1004
1004
{
1005
1005
testcase (" Transaction Types" );
1006
1006
@@ -1089,7 +1089,7 @@ class MultiSign_test : public beast::unit_test::suite
1089
1089
}
1090
1090
1091
1091
void
1092
- test_badSignatureText (FeatureBitset features)
1092
+ testBadSignatureText (FeatureBitset features)
1093
1093
{
1094
1094
testcase (" Bad Signature Text" );
1095
1095
@@ -1285,7 +1285,7 @@ class MultiSign_test : public beast::unit_test::suite
1285
1285
}
1286
1286
1287
1287
void
1288
- test_noMultiSigners (FeatureBitset features)
1288
+ testNoMultiSigners (FeatureBitset features)
1289
1289
{
1290
1290
testcase (" No Multisigners" );
1291
1291
@@ -1304,7 +1304,7 @@ class MultiSign_test : public beast::unit_test::suite
1304
1304
}
1305
1305
1306
1306
void
1307
- test_multisigningMultisigner (FeatureBitset features)
1307
+ testMultisigningMultisigner (FeatureBitset features)
1308
1308
{
1309
1309
testcase (" Multisigning multisigner" );
1310
1310
@@ -1381,7 +1381,7 @@ class MultiSign_test : public beast::unit_test::suite
1381
1381
}
1382
1382
1383
1383
void
1384
- test_signForHash (FeatureBitset features)
1384
+ testSignForHash (FeatureBitset features)
1385
1385
{
1386
1386
testcase (" sign_for Hash" );
1387
1387
@@ -1464,7 +1464,7 @@ class MultiSign_test : public beast::unit_test::suite
1464
1464
}
1465
1465
1466
1466
void
1467
- test_amendmentTransition ()
1467
+ testAmendmentTransition ()
1468
1468
{
1469
1469
testcase (" Amendment Transition" );
1470
1470
@@ -1559,7 +1559,7 @@ class MultiSign_test : public beast::unit_test::suite
1559
1559
}
1560
1560
1561
1561
void
1562
- test_signersWithTickets (FeatureBitset features)
1562
+ testSignersWithTickets (FeatureBitset features)
1563
1563
{
1564
1564
testcase (" Signers With Tickets" );
1565
1565
@@ -1600,7 +1600,7 @@ class MultiSign_test : public beast::unit_test::suite
1600
1600
}
1601
1601
1602
1602
void
1603
- test_signersWithTags (FeatureBitset features)
1603
+ testSignersWithTags (FeatureBitset features)
1604
1604
{
1605
1605
if (!features[featureExpandedSignerList])
1606
1606
return ;
@@ -1680,7 +1680,7 @@ class MultiSign_test : public beast::unit_test::suite
1680
1680
}
1681
1681
1682
1682
void
1683
- test_signerListSetFlags (FeatureBitset features)
1683
+ testSignerListSetFlags (FeatureBitset features)
1684
1684
{
1685
1685
using namespace test ::jtx;
1686
1686
@@ -1702,27 +1702,57 @@ class MultiSign_test : public beast::unit_test::suite
1702
1702
env.close ();
1703
1703
}
1704
1704
1705
+ void
1706
+ testSignerListObject (FeatureBitset features)
1707
+ {
1708
+ testcase (" SignerList Object" );
1709
+
1710
+ // Verify that the SignerList object is created correctly.
1711
+ using namespace jtx ;
1712
+ Env env{*this , features};
1713
+ Account const alice{" alice" , KeyType::ed25519};
1714
+ env.fund (XRP (1000 ), alice);
1715
+ env.close ();
1716
+
1717
+ // Attach phantom signers to alice.
1718
+ env (signers (alice, 1 , {{bogie, 1 }, {demon, 1 }}));
1719
+ env.close ();
1720
+
1721
+ // Verify that the SignerList object was created correctly.
1722
+ auto const & sle = env.le (keylet::signers (alice.id ()));
1723
+ BEAST_EXPECT (sle);
1724
+ BEAST_EXPECT (sle->getFieldArray (sfSignerEntries).size () == 2 );
1725
+ if (features[fixIncludeKeyletFields])
1726
+ {
1727
+ BEAST_EXPECT ((*sle)[sfOwner] == alice.id ());
1728
+ }
1729
+ else
1730
+ {
1731
+ BEAST_EXPECT (!sle->isFieldPresent (sfOwner));
1732
+ }
1733
+ }
1734
+
1705
1735
void
1706
1736
testAll (FeatureBitset features)
1707
1737
{
1708
- test_noReserve (features);
1709
- test_signerListSet (features);
1710
- test_phantomSigners (features);
1711
- test_fee (features);
1712
- test_misorderedSigners (features);
1713
- test_masterSigners (features);
1714
- test_regularSigners (features);
1715
- test_regularSignersUsingSubmitMulti (features);
1716
- test_heterogeneousSigners (features);
1717
- test_keyDisable (features);
1718
- test_regKey (features);
1719
- test_txTypes (features);
1720
- test_badSignatureText (features);
1721
- test_noMultiSigners (features);
1722
- test_multisigningMultisigner (features);
1723
- test_signForHash (features);
1724
- test_signersWithTickets (features);
1725
- test_signersWithTags (features);
1738
+ testNoReserve (features);
1739
+ testSignerListSet (features);
1740
+ testPhantomSigners (features);
1741
+ testFee (features);
1742
+ testMisorderedSigners (features);
1743
+ testMasterSigners (features);
1744
+ testRegularSigners (features);
1745
+ testRegularSignersUsingSubmitMulti (features);
1746
+ testHeterogeneousSigners (features);
1747
+ testKeyDisable (features);
1748
+ testRegKey (features);
1749
+ testTxTypes (features);
1750
+ testBadSignatureText (features);
1751
+ testNoMultiSigners (features);
1752
+ testMultisigningMultisigner (features);
1753
+ testSignForHash (features);
1754
+ testSignersWithTickets (features);
1755
+ testSignersWithTags (features);
1726
1756
}
1727
1757
1728
1758
void
@@ -1739,10 +1769,13 @@ class MultiSign_test : public beast::unit_test::suite
1739
1769
testAll (all - featureExpandedSignerList);
1740
1770
testAll (all);
1741
1771
1742
- test_signerListSetFlags (all - fixInvalidTxFlags);
1743
- test_signerListSetFlags (all);
1772
+ testSignerListSetFlags (all - fixInvalidTxFlags);
1773
+ testSignerListSetFlags (all);
1774
+
1775
+ testSignerListObject (all - fixIncludeKeyletFields);
1776
+ testSignerListObject (all);
1744
1777
1745
- test_amendmentTransition ();
1778
+ testAmendmentTransition ();
1746
1779
}
1747
1780
};
1748
1781
0 commit comments