mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Change features default behavior in Env (RIPD-1460):
Enable all supported amendments in Env by default. Rename `features()` to `with_features()` and add `all_features_except()` to support feature subsets in Env. Refactor internal feature handling based on a bitset.
This commit is contained in:
@@ -39,7 +39,7 @@ public:
|
||||
void test_noReserve()
|
||||
{
|
||||
using namespace jtx;
|
||||
Env env(*this, features(featureMultiSign));
|
||||
Env env(*this, with_features(featureMultiSign));
|
||||
Account const alice {"alice", KeyType::secp256k1};
|
||||
|
||||
// Pay alice enough to meet the initial reserve, but not enough to
|
||||
@@ -87,7 +87,7 @@ public:
|
||||
void test_signerListSet()
|
||||
{
|
||||
using namespace jtx;
|
||||
Env env(*this, features(featureMultiSign));
|
||||
Env env(*this, with_features(featureMultiSign));
|
||||
Account const alice {"alice", KeyType::ed25519};
|
||||
env.fund(XRP(1000), alice);
|
||||
|
||||
@@ -132,7 +132,7 @@ public:
|
||||
void test_phantomSigners()
|
||||
{
|
||||
using namespace jtx;
|
||||
Env env(*this, features(featureMultiSign));
|
||||
Env env(*this, with_features(featureMultiSign));
|
||||
Account const alice {"alice", KeyType::ed25519};
|
||||
env.fund(XRP(1000), alice);
|
||||
env.close();
|
||||
@@ -191,7 +191,7 @@ public:
|
||||
test_enablement()
|
||||
{
|
||||
using namespace jtx;
|
||||
Env env(*this);
|
||||
Env env(*this, no_features);
|
||||
Account const alice {"alice", KeyType::ed25519};
|
||||
env.fund(XRP(1000), alice);
|
||||
env.close();
|
||||
@@ -233,7 +233,7 @@ public:
|
||||
void test_fee ()
|
||||
{
|
||||
using namespace jtx;
|
||||
Env env(*this, features(featureMultiSign));
|
||||
Env env(*this, with_features(featureMultiSign));
|
||||
Account const alice {"alice", KeyType::ed25519};
|
||||
env.fund(XRP(1000), alice);
|
||||
env.close();
|
||||
@@ -283,7 +283,7 @@ public:
|
||||
void test_misorderedSigners()
|
||||
{
|
||||
using namespace jtx;
|
||||
Env env(*this, features(featureMultiSign));
|
||||
Env env(*this, with_features(featureMultiSign));
|
||||
Account const alice {"alice", KeyType::ed25519};
|
||||
env.fund(XRP(1000), alice);
|
||||
env.close();
|
||||
@@ -305,7 +305,7 @@ public:
|
||||
void test_masterSigners()
|
||||
{
|
||||
using namespace jtx;
|
||||
Env env(*this, features(featureMultiSign));
|
||||
Env env(*this, with_features(featureMultiSign));
|
||||
Account const alice {"alice", KeyType::ed25519};
|
||||
Account const becky {"becky", KeyType::secp256k1};
|
||||
Account const cheri {"cheri", KeyType::ed25519};
|
||||
@@ -357,7 +357,7 @@ public:
|
||||
void test_regularSigners()
|
||||
{
|
||||
using namespace jtx;
|
||||
Env env(*this, features(featureMultiSign));
|
||||
Env env(*this, with_features(featureMultiSign));
|
||||
Account const alice {"alice", KeyType::secp256k1};
|
||||
Account const becky {"becky", KeyType::ed25519};
|
||||
Account const cheri {"cheri", KeyType::secp256k1};
|
||||
@@ -415,7 +415,7 @@ public:
|
||||
void test_regularSignersUsingSubmitMulti()
|
||||
{
|
||||
using namespace jtx;
|
||||
Env env(*this, features(featureMultiSign));
|
||||
Env env(*this, with_features(featureMultiSign));
|
||||
Account const alice {"alice", KeyType::secp256k1};
|
||||
Account const becky {"becky", KeyType::ed25519};
|
||||
Account const cheri {"cheri", KeyType::secp256k1};
|
||||
@@ -618,7 +618,7 @@ public:
|
||||
void test_heterogeneousSigners()
|
||||
{
|
||||
using namespace jtx;
|
||||
Env env(*this, features(featureMultiSign));
|
||||
Env env(*this, with_features(featureMultiSign));
|
||||
Account const alice {"alice", KeyType::secp256k1};
|
||||
Account const becky {"becky", KeyType::ed25519};
|
||||
Account const cheri {"cheri", KeyType::secp256k1};
|
||||
@@ -733,7 +733,7 @@ public:
|
||||
void test_keyDisable()
|
||||
{
|
||||
using namespace jtx;
|
||||
Env env(*this, features(featureMultiSign));
|
||||
Env env(*this, with_features(featureMultiSign));
|
||||
Account const alice {"alice", KeyType::ed25519};
|
||||
env.fund(XRP(1000), alice);
|
||||
|
||||
@@ -808,7 +808,7 @@ public:
|
||||
void test_regKey()
|
||||
{
|
||||
using namespace jtx;
|
||||
Env env(*this, features(featureMultiSign));
|
||||
Env env(*this, with_features(featureMultiSign));
|
||||
Account const alice {"alice", KeyType::secp256k1};
|
||||
env.fund(XRP(1000), alice);
|
||||
|
||||
@@ -840,7 +840,7 @@ public:
|
||||
void test_txTypes()
|
||||
{
|
||||
using namespace jtx;
|
||||
Env env(*this, features(featureMultiSign));
|
||||
Env env(*this, with_features(featureMultiSign));
|
||||
Account const alice {"alice", KeyType::secp256k1};
|
||||
Account const becky {"becky", KeyType::ed25519};
|
||||
Account const zelda {"zelda", KeyType::secp256k1};
|
||||
@@ -924,7 +924,7 @@ public:
|
||||
// Verify that the text returned for signature failures is correct.
|
||||
using namespace jtx;
|
||||
|
||||
Env env(*this, features(featureMultiSign));
|
||||
Env env(*this, with_features(featureMultiSign));
|
||||
|
||||
// lambda that submits an STTx and returns the resulting JSON.
|
||||
auto submitSTTx = [&env] (STTx const& stx)
|
||||
@@ -1058,7 +1058,7 @@ public:
|
||||
void test_noMultiSigners()
|
||||
{
|
||||
using namespace jtx;
|
||||
Env env {*this, features(featureMultiSign)};
|
||||
Env env {*this, with_features(featureMultiSign)};
|
||||
Account const alice {"alice", KeyType::ed25519};
|
||||
Account const becky {"becky", KeyType::secp256k1};
|
||||
env.fund(XRP(1000), alice, becky);
|
||||
|
||||
Reference in New Issue
Block a user