mirror of
https://github.com/Xahau/xahaud.git
synced 2026-01-25 00:55:17 +00:00
Compare commits
30 Commits
reduced-im
...
sync-rippl
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5fe5ef727c | ||
|
|
d8515b5afe | ||
|
|
f6d789464e | ||
|
|
c34ca594a4 | ||
|
|
e47d6891cc | ||
|
|
bfe1463c37 | ||
|
|
8d04a1a434 | ||
|
|
d688644727 | ||
|
|
f0b6e57408 | ||
|
|
43ae851238 | ||
|
|
eefc0f1150 | ||
|
|
87097576f4 | ||
|
|
0c73050e6f | ||
|
|
ae1c00e339 | ||
|
|
44bc7f6109 | ||
|
|
be7bb83a05 | ||
|
|
289c1ebc68 | ||
|
|
997b487bbb | ||
|
|
2157440cda | ||
|
|
3f76ff5afe | ||
|
|
c923970607 | ||
|
|
2956f14de8 | ||
|
|
e2f61ce86c | ||
|
|
1fafd1059d | ||
|
|
cee8409d60 | ||
|
|
f23c32cc00 | ||
|
|
1b835b7c05 | ||
|
|
9ec1e527a3 | ||
|
|
469eb2b8ac | ||
|
|
0dc262dd9c |
@@ -67,5 +67,5 @@ git-subtree. See those directories' README files for more details.
|
||||
- [explorer.xahau.network](https://explorer.xahau.network)
|
||||
- **Testnet & Faucet**: Test applications and obtain test XAH at [xahau-test.net](https://xahau-test.net) and use the testnet explorer at [explorer.xahau.network](https://explorer.xahau.network).
|
||||
- **Supporting Wallets**: A list of wallets that support XAH and Xahau-based assets.
|
||||
- [Xaman](https://xaman.app)
|
||||
- [Xumm](https://xumm.app)
|
||||
- [Crossmark](https://crossmark.io)
|
||||
|
||||
@@ -458,13 +458,6 @@ Change::activateXahauGenesis()
|
||||
bool const isTest =
|
||||
(ctx_.tx.getFlags() & tfTestSuite) && ctx_.app.config().standalone();
|
||||
|
||||
// RH NOTE: we'll only configure xahau governance structure on networks that
|
||||
// begin with 2133... so production xahau: 21337 and its testnet 21338
|
||||
// with 21330-21336 and 21339 also valid and reserved for dev nets etc.
|
||||
// all other Network IDs will be conventionally configured.
|
||||
if ((ctx_.app.config().NETWORK_ID / 10) != 2133 && !isTest)
|
||||
return;
|
||||
|
||||
auto [ng_entries, l1_entries, l2_entries, gov_params] =
|
||||
normalizeXahauGenesis(
|
||||
isTest ? TestNonGovernanceDistribution : NonGovernanceDistribution,
|
||||
|
||||
@@ -889,45 +889,6 @@ Import::preclaim(PreclaimContext const& ctx)
|
||||
}
|
||||
|
||||
auto const& sle = ctx.view.read(keylet::account(ctx.tx[sfAccount]));
|
||||
|
||||
auto const tt = stpTrans->getTxnType();
|
||||
if ((tt == ttSIGNER_LIST_SET || tt == ttREGULAR_KEY_SET) &&
|
||||
ctx.view.rules().enabled(fixReduceImport) && sle)
|
||||
{
|
||||
// blackhole check
|
||||
do
|
||||
{
|
||||
// if master key is not set then it is not blackholed
|
||||
if (!(sle->getFlags() & lsfDisableMaster))
|
||||
break;
|
||||
|
||||
// if a regular key is set then it must be acc 0, 1, or 2 otherwise
|
||||
// not blackholed
|
||||
if (sle->isFieldPresent(sfRegularKey))
|
||||
{
|
||||
AccountID rk = sle->getAccountID(sfRegularKey);
|
||||
static const AccountID ACCOUNT_ZERO(0);
|
||||
static const AccountID ACCOUNT_ONE(1);
|
||||
static const AccountID ACCOUNT_TWO(2);
|
||||
|
||||
if (rk != ACCOUNT_ZERO && rk != ACCOUNT_ONE &&
|
||||
rk != ACCOUNT_TWO)
|
||||
break;
|
||||
}
|
||||
|
||||
// if a signer list is set then it's not blackholed
|
||||
auto const signerListKeylet = keylet::signers(ctx.tx[sfAccount]);
|
||||
if (ctx.view.exists(signerListKeylet))
|
||||
break;
|
||||
|
||||
// execution to here means it's blackholed
|
||||
JLOG(ctx.j.warn())
|
||||
<< "Import: during preclaim target account is blackholed "
|
||||
<< ctx.tx[sfAccount] << ", bailing.";
|
||||
return tefIMPORT_BLACKHOLED;
|
||||
} while (0);
|
||||
}
|
||||
|
||||
if (sle && sle->isFieldPresent(sfImportSequence))
|
||||
{
|
||||
uint32_t sleImportSequence = sle->getFieldU32(sfImportSequence);
|
||||
|
||||
@@ -710,7 +710,10 @@ Shard::finalize(bool writeSQLite, std::optional<uint256> const& referenceHash)
|
||||
if (writeSQLite && !storeSQLite(ledger))
|
||||
return fail("failed storing to SQLite databases");
|
||||
|
||||
assert(ledger->info().seq == ledgerSeq && ledger->read(keylet::fees()));
|
||||
assert(
|
||||
ledger->info().seq == ledgerSeq &&
|
||||
(ledger->info().seq < XRP_LEDGER_EARLIEST_FEES ||
|
||||
ledger->read(keylet::fees())));
|
||||
|
||||
hash = ledger->info().parentHash;
|
||||
next = std::move(ledger);
|
||||
|
||||
@@ -74,7 +74,7 @@ namespace detail {
|
||||
// Feature.cpp. Because it's only used to reserve storage, and determine how
|
||||
// large to make the FeatureBitset, it MAY be larger. It MUST NOT be less than
|
||||
// the actual number of amendments. A LogicError on startup will verify this.
|
||||
static constexpr std::size_t numFeatures = 75;
|
||||
static constexpr std::size_t numFeatures = 74;
|
||||
|
||||
/** Amendments that this server supports and the default voting behavior.
|
||||
Whether they are enabled depends on the Rules defined in the validated
|
||||
@@ -362,7 +362,6 @@ extern uint256 const fix240819;
|
||||
extern uint256 const fixPageCap;
|
||||
extern uint256 const fix240911;
|
||||
extern uint256 const fixFloatDivide;
|
||||
extern uint256 const fixReduceImport;
|
||||
|
||||
} // namespace ripple
|
||||
|
||||
|
||||
@@ -184,7 +184,6 @@ enum TEFcodes : TERUnderlyingType {
|
||||
tefPAST_IMPORT_SEQ,
|
||||
tefPAST_IMPORT_VL_SEQ,
|
||||
tefNONDIR_EMIT,
|
||||
tefIMPORT_BLACKHOLED,
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@@ -468,7 +468,6 @@ REGISTER_FIX (fix240819, Supported::yes, VoteBehavior::De
|
||||
REGISTER_FIX (fixPageCap, Supported::yes, VoteBehavior::DefaultYes);
|
||||
REGISTER_FIX (fix240911, Supported::yes, VoteBehavior::DefaultYes);
|
||||
REGISTER_FIX (fixFloatDivide, Supported::yes, VoteBehavior::DefaultYes);
|
||||
REGISTER_FIX (fixReduceImport, Supported::yes, VoteBehavior::DefaultYes);
|
||||
|
||||
// The following amendments are obsolete, but must remain supported
|
||||
// because they could potentially get enabled.
|
||||
|
||||
@@ -116,7 +116,6 @@ transResults()
|
||||
MAKE_ERROR(tefNO_TICKET, "Ticket is not in ledger."),
|
||||
MAKE_ERROR(tefNFTOKEN_IS_NOT_TRANSFERABLE, "The specified NFToken is not transferable."),
|
||||
MAKE_ERROR(tefNONDIR_EMIT, "An emitted txn was injected into the ledger without a corresponding directory entry."),
|
||||
MAKE_ERROR(tefIMPORT_BLACKHOLED, "Cannot import keying because target account is blackholed."),
|
||||
|
||||
MAKE_ERROR(telLOCAL_ERROR, "Local failure."),
|
||||
MAKE_ERROR(telBAD_DOMAIN, "Domain too long."),
|
||||
|
||||
@@ -79,7 +79,7 @@ class Import_test : public beast::unit_test::suite
|
||||
importVLSequence(jtx::Env const& env, PublicKey const& pk)
|
||||
{
|
||||
auto const sle = env.le(keylet::import_vlseq(pk));
|
||||
if (sle && sle->isFieldPresent(sfImportSequence))
|
||||
if (sle->isFieldPresent(sfImportSequence))
|
||||
return (*sle)[sfImportSequence];
|
||||
return 0;
|
||||
}
|
||||
@@ -2672,134 +2672,6 @@ class Import_test : public beast::unit_test::suite
|
||||
env(import::import(alice, tmpXpop), ter(temMALFORMED));
|
||||
}
|
||||
|
||||
// tefIMPORT_BLACKHOLED - SetRegularKey (w/seed) AccountZero
|
||||
{
|
||||
test::jtx::Env env{
|
||||
*this, network::makeNetworkVLConfig(21337, keys)};
|
||||
auto const feeDrops = env.current()->fees().base;
|
||||
|
||||
auto const alice = Account("alice");
|
||||
env.fund(XRP(1000), alice);
|
||||
env.close();
|
||||
|
||||
// Set Regular Key
|
||||
Json::Value jv;
|
||||
jv[jss::Account] = alice.human();
|
||||
const AccountID ACCOUNT_ZERO(0);
|
||||
jv["RegularKey"] = to_string(ACCOUNT_ZERO);
|
||||
jv[jss::TransactionType] = jss::SetRegularKey;
|
||||
env(jv, alice);
|
||||
|
||||
// Disable Master Key
|
||||
env(fset(alice, asfDisableMaster), sig(alice));
|
||||
env.close();
|
||||
|
||||
// Import with Master Key
|
||||
Json::Value tmpXpop =
|
||||
import::loadXpop(ImportTCSetRegularKey::w_seed);
|
||||
env(import::import(alice, tmpXpop),
|
||||
ter(tefIMPORT_BLACKHOLED),
|
||||
fee(feeDrops * 10),
|
||||
sig(alice));
|
||||
env.close();
|
||||
}
|
||||
|
||||
// tefIMPORT_BLACKHOLED - SetRegularKey (w/seed) AccountOne
|
||||
{
|
||||
test::jtx::Env env{
|
||||
*this, network::makeNetworkVLConfig(21337, keys)};
|
||||
auto const feeDrops = env.current()->fees().base;
|
||||
|
||||
auto const alice = Account("alice");
|
||||
env.fund(XRP(1000), alice);
|
||||
env.close();
|
||||
|
||||
// Set Regular Key
|
||||
Json::Value jv;
|
||||
jv[jss::Account] = alice.human();
|
||||
const AccountID ACCOUNT_ONE(1);
|
||||
jv["RegularKey"] = to_string(ACCOUNT_ONE);
|
||||
jv[jss::TransactionType] = jss::SetRegularKey;
|
||||
env(jv, alice);
|
||||
|
||||
// Disable Master Key
|
||||
env(fset(alice, asfDisableMaster), sig(alice));
|
||||
env.close();
|
||||
|
||||
// Import with Master Key
|
||||
Json::Value tmpXpop =
|
||||
import::loadXpop(ImportTCSetRegularKey::w_seed);
|
||||
env(import::import(alice, tmpXpop),
|
||||
ter(tefIMPORT_BLACKHOLED),
|
||||
fee(feeDrops * 10),
|
||||
sig(alice));
|
||||
env.close();
|
||||
}
|
||||
|
||||
// tefIMPORT_BLACKHOLED - SetRegularKey (w/seed) AccountTwo
|
||||
{
|
||||
test::jtx::Env env{
|
||||
*this, network::makeNetworkVLConfig(21337, keys)};
|
||||
auto const feeDrops = env.current()->fees().base;
|
||||
|
||||
auto const alice = Account("alice");
|
||||
env.fund(XRP(1000), alice);
|
||||
env.close();
|
||||
|
||||
// Set Regular Key
|
||||
Json::Value jv;
|
||||
jv[jss::Account] = alice.human();
|
||||
const AccountID ACCOUNT_TWO(2);
|
||||
jv["RegularKey"] = to_string(ACCOUNT_TWO);
|
||||
jv[jss::TransactionType] = jss::SetRegularKey;
|
||||
env(jv, alice);
|
||||
|
||||
// Disable Master Key
|
||||
env(fset(alice, asfDisableMaster), sig(alice));
|
||||
env.close();
|
||||
|
||||
// Import with Master Key
|
||||
Json::Value tmpXpop =
|
||||
import::loadXpop(ImportTCSetRegularKey::w_seed);
|
||||
env(import::import(alice, tmpXpop),
|
||||
ter(tefIMPORT_BLACKHOLED),
|
||||
fee(feeDrops * 10),
|
||||
sig(alice));
|
||||
env.close();
|
||||
}
|
||||
|
||||
// tefIMPORT_BLACKHOLED - SignersListSet (w/seed)
|
||||
{
|
||||
test::jtx::Env env{
|
||||
*this, network::makeNetworkVLConfig(21337, keys)};
|
||||
auto const feeDrops = env.current()->fees().base;
|
||||
|
||||
auto const alice = Account("alice");
|
||||
env.fund(XRP(1000), alice);
|
||||
env.close();
|
||||
|
||||
// Set Regular Key
|
||||
Json::Value jv;
|
||||
jv[jss::Account] = alice.human();
|
||||
const AccountID ACCOUNT_ZERO(0);
|
||||
jv["RegularKey"] = to_string(ACCOUNT_ZERO);
|
||||
jv[jss::TransactionType] = jss::SetRegularKey;
|
||||
env(jv, alice);
|
||||
|
||||
// Disable Master Key
|
||||
env(fset(alice, asfDisableMaster), sig(alice));
|
||||
env.close();
|
||||
|
||||
// Import with Master Key
|
||||
Json::Value tmpXpop =
|
||||
import::loadXpop(ImportTCSignersListSet::w_seed);
|
||||
env(import::import(alice, tmpXpop),
|
||||
ter(tefIMPORT_BLACKHOLED),
|
||||
fee(feeDrops * 10),
|
||||
sig(alice));
|
||||
env.close();
|
||||
}
|
||||
|
||||
// tefPAST_IMPORT_SEQ
|
||||
{
|
||||
test::jtx::Env env{
|
||||
@@ -4708,22 +4580,14 @@ class Import_test : public beast::unit_test::suite
|
||||
// confirm signers set
|
||||
auto const [signers, signersSle] =
|
||||
signersKeyAndSle(*env.current(), alice);
|
||||
auto const signerEntries =
|
||||
signersSle->getFieldArray(sfSignerEntries);
|
||||
BEAST_EXPECT(signerEntries.size() == 2);
|
||||
BEAST_EXPECT(signerEntries[0u].getFieldU16(sfSignerWeight) == 1);
|
||||
BEAST_EXPECT(
|
||||
signersSle && signersSle->isFieldPresent(sfSignerEntries));
|
||||
if (signersSle && signersSle->isFieldPresent(sfSignerEntries))
|
||||
{
|
||||
auto const signerEntries =
|
||||
signersSle->getFieldArray(sfSignerEntries);
|
||||
BEAST_EXPECT(signerEntries.size() == 2);
|
||||
BEAST_EXPECT(
|
||||
signerEntries[0u].getFieldU16(sfSignerWeight) == 1);
|
||||
BEAST_EXPECT(
|
||||
signerEntries[0u].getAccountID(sfAccount) == carol.id());
|
||||
BEAST_EXPECT(
|
||||
signerEntries[1u].getFieldU16(sfSignerWeight) == 1);
|
||||
BEAST_EXPECT(
|
||||
signerEntries[1u].getAccountID(sfAccount) == bob.id());
|
||||
}
|
||||
signerEntries[0u].getAccountID(sfAccount) == carol.id());
|
||||
BEAST_EXPECT(signerEntries[1u].getFieldU16(sfSignerWeight) == 1);
|
||||
BEAST_EXPECT(signerEntries[1u].getAccountID(sfAccount) == bob.id());
|
||||
|
||||
// confirm multisign tx
|
||||
env.close();
|
||||
@@ -6122,69 +5986,6 @@ class Import_test : public beast::unit_test::suite
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
testBlackhole(FeatureBitset features)
|
||||
{
|
||||
testcase("blackhole");
|
||||
|
||||
using namespace test::jtx;
|
||||
using namespace std::literals;
|
||||
|
||||
auto blackholeAccount = [&](Env& env, Account const& acct) {
|
||||
// Set Regular Key
|
||||
Json::Value jv;
|
||||
jv[jss::Account] = acct.human();
|
||||
const AccountID ACCOUNT_ZERO(0);
|
||||
jv["RegularKey"] = to_string(ACCOUNT_ZERO);
|
||||
jv[jss::TransactionType] = jss::SetRegularKey;
|
||||
env(jv, acct);
|
||||
|
||||
// Disable Master Key
|
||||
env(fset(acct, asfDisableMaster), sig(acct));
|
||||
env.close();
|
||||
};
|
||||
|
||||
auto burnHeader = [&](Env& env) {
|
||||
// confirm total coins header
|
||||
auto const initCoins = env.current()->info().drops;
|
||||
BEAST_EXPECT(initCoins == 100'000'000'000'000'000);
|
||||
|
||||
// burn 10'000 xrp
|
||||
auto const master = Account("masterpassphrase");
|
||||
env(noop(master), fee(100'000'000'000'000), ter(tesSUCCESS));
|
||||
env.close();
|
||||
|
||||
// confirm total coins header
|
||||
auto const burnCoins = env.current()->info().drops;
|
||||
BEAST_EXPECT(burnCoins == initCoins - 100'000'000'000'000);
|
||||
};
|
||||
|
||||
// AccountSet (w/seed)
|
||||
{
|
||||
test::jtx::Env env{
|
||||
*this, network::makeNetworkVLConfig(21337, keys)};
|
||||
auto const feeDrops = env.current()->fees().base;
|
||||
|
||||
// Burn Header
|
||||
burnHeader(env);
|
||||
|
||||
auto const alice = Account("alice");
|
||||
env.fund(XRP(1000), alice);
|
||||
env.close();
|
||||
|
||||
// Blackhole Account
|
||||
blackholeAccount(env, alice);
|
||||
|
||||
// Import with Master Key
|
||||
Json::Value tmpXpop = import::loadXpop(ImportTCAccountSet::w_seed);
|
||||
env(import::import(alice, tmpXpop),
|
||||
ter(tesSUCCESS),
|
||||
fee(feeDrops * 10),
|
||||
sig(alice));
|
||||
env.close();
|
||||
}
|
||||
}
|
||||
|
||||
public:
|
||||
void
|
||||
run() override
|
||||
@@ -6225,7 +6026,6 @@ public:
|
||||
testMaxSupply(features);
|
||||
testMinMax(features);
|
||||
testHalving(features - featureOwnerPaysFee);
|
||||
testBlackhole(features);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
#include <ripple/app/misc/HashRouter.h>
|
||||
#include <ripple/app/tx/apply.h>
|
||||
#include <ripple/app/tx/impl/XahauGenesis.h>
|
||||
#include <ripple/core/Config.h>
|
||||
#include <ripple/json/json_reader.h>
|
||||
#include <ripple/protocol/Feature.h>
|
||||
#include <ripple/protocol/Indexes.h>
|
||||
@@ -28,7 +27,6 @@
|
||||
#include <ripple/protocol/jss.h>
|
||||
#include <string>
|
||||
#include <test/jtx.h>
|
||||
#include <test/jtx/envconfig.h>
|
||||
#include <vector>
|
||||
|
||||
#define BEAST_REQUIRE(x) \
|
||||
@@ -61,18 +59,7 @@ maybe_to_string(T val, std::enable_if_t<!std::is_integral_v<T>, int> = 0)
|
||||
using namespace XahauGenesis;
|
||||
|
||||
namespace ripple {
|
||||
|
||||
inline std::unique_ptr<Config>
|
||||
makeNetworkConfig(uint32_t networkID)
|
||||
{
|
||||
using namespace test::jtx;
|
||||
return envconfig([&](std::unique_ptr<Config> cfg) {
|
||||
cfg->NETWORK_ID = networkID;
|
||||
return cfg;
|
||||
});
|
||||
}
|
||||
namespace test {
|
||||
|
||||
/*
|
||||
Accounts used in this test suite:
|
||||
alice: AE123A8556F3CF91154711376AFB0F894F832B3D,
|
||||
@@ -138,8 +125,7 @@ struct XahauGenesis_test : public beast::unit_test::suite
|
||||
bool burnedViaTest =
|
||||
false, // means the calling test already burned some of the genesis
|
||||
bool skipTests = false,
|
||||
bool const testFlag = false,
|
||||
bool const badNetID = false)
|
||||
bool const testFlag = false)
|
||||
{
|
||||
using namespace jtx;
|
||||
|
||||
@@ -197,20 +183,6 @@ struct XahauGenesis_test : public beast::unit_test::suite
|
||||
if (skipTests)
|
||||
return;
|
||||
|
||||
if (badNetID)
|
||||
{
|
||||
BEAST_EXPECT(
|
||||
100000000000000000ULL ==
|
||||
env.app().getLedgerMaster().getClosedLedger()->info().drops);
|
||||
|
||||
auto genesisAccRoot = env.le(keylet::account(genesisAccID));
|
||||
BEAST_REQUIRE(!!genesisAccRoot);
|
||||
BEAST_EXPECT(
|
||||
genesisAccRoot->getFieldAmount(sfBalance) ==
|
||||
XRPAmount(100000000000000000ULL));
|
||||
return;
|
||||
}
|
||||
|
||||
// sum the initial distribution balances, these should equal total coins
|
||||
// in the closed ledger
|
||||
std::vector<std::pair<std::string, XRPAmount>> const& l1membership =
|
||||
@@ -470,59 +442,17 @@ struct XahauGenesis_test : public beast::unit_test::suite
|
||||
{
|
||||
testcase("Test activation");
|
||||
using namespace jtx;
|
||||
Env env{
|
||||
*this, makeNetworkConfig(21337), features - featureXahauGenesis};
|
||||
Env env{*this, envconfig(), features - featureXahauGenesis};
|
||||
|
||||
activate(__LINE__, env, false, false, false);
|
||||
}
|
||||
|
||||
void
|
||||
testBadNetworkIDActivation(FeatureBitset features)
|
||||
{
|
||||
testcase("Test Bad Network ID activation");
|
||||
using namespace jtx;
|
||||
std::vector<int> badNetIDs{
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
10,
|
||||
100,
|
||||
1000,
|
||||
10000,
|
||||
20000,
|
||||
21000,
|
||||
21328,
|
||||
21329,
|
||||
21340,
|
||||
21341,
|
||||
65535};
|
||||
|
||||
for (int netid : badNetIDs)
|
||||
{
|
||||
Env env{
|
||||
*this,
|
||||
makeNetworkConfig(netid),
|
||||
features - featureXahauGenesis};
|
||||
activate(__LINE__, env, false, false, false, true);
|
||||
}
|
||||
|
||||
for (int netid = 21330; netid <= 21339; ++netid)
|
||||
{
|
||||
Env env{
|
||||
*this,
|
||||
makeNetworkConfig(netid),
|
||||
features - featureXahauGenesis};
|
||||
activate(__LINE__, env, false, false, false, false);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
testWithSignerList(FeatureBitset features)
|
||||
{
|
||||
using namespace jtx;
|
||||
testcase("Test signerlist");
|
||||
Env env{
|
||||
*this, makeNetworkConfig(21337), features - featureXahauGenesis};
|
||||
Env env{*this, envconfig(), features - featureXahauGenesis};
|
||||
|
||||
Account const alice{"alice", KeyType::ed25519};
|
||||
env.fund(XRP(1000), alice);
|
||||
@@ -538,8 +468,7 @@ struct XahauGenesis_test : public beast::unit_test::suite
|
||||
{
|
||||
using namespace jtx;
|
||||
testcase("Test regkey");
|
||||
Env env{
|
||||
*this, makeNetworkConfig(21337), features - featureXahauGenesis};
|
||||
Env env{*this, envconfig(), features - featureXahauGenesis};
|
||||
|
||||
env.memoize(env.master);
|
||||
Account const alice("alice");
|
||||
@@ -738,11 +667,7 @@ struct XahauGenesis_test : public beast::unit_test::suite
|
||||
{
|
||||
using namespace jtx;
|
||||
testcase("Test governance membership voting L1");
|
||||
Env env{
|
||||
*this,
|
||||
makeNetworkConfig(21337),
|
||||
features - featureXahauGenesis,
|
||||
nullptr};
|
||||
Env env{*this, envconfig(), features - featureXahauGenesis, nullptr};
|
||||
|
||||
auto const alice = Account("alice");
|
||||
auto const bob = Account("bob");
|
||||
@@ -2186,8 +2111,7 @@ struct XahauGenesis_test : public beast::unit_test::suite
|
||||
using namespace jtx;
|
||||
testcase("Test governance membership voting L2");
|
||||
|
||||
Env env{
|
||||
*this, makeNetworkConfig(21337), features - featureXahauGenesis};
|
||||
Env env{*this, envconfig(), features - featureXahauGenesis};
|
||||
|
||||
auto const alice = Account("alice");
|
||||
auto const bob = Account("bob");
|
||||
@@ -3784,7 +3708,7 @@ struct XahauGenesis_test : public beast::unit_test::suite
|
||||
using namespace std::chrono_literals;
|
||||
testcase("test last close time");
|
||||
|
||||
Env env{*this, makeNetworkConfig(21337), features};
|
||||
Env env{*this, envconfig(), features};
|
||||
validateTime(lastClose(env), 0);
|
||||
|
||||
// last close = 0
|
||||
@@ -3814,8 +3738,7 @@ struct XahauGenesis_test : public beast::unit_test::suite
|
||||
using namespace jtx;
|
||||
testcase("test claim reward rate is == 0");
|
||||
|
||||
Env env{
|
||||
*this, makeNetworkConfig(21337), features - featureXahauGenesis};
|
||||
Env env{*this, envconfig(), features - featureXahauGenesis};
|
||||
|
||||
STAmount const feesXRP = XRP(1);
|
||||
|
||||
@@ -3860,8 +3783,7 @@ struct XahauGenesis_test : public beast::unit_test::suite
|
||||
using namespace jtx;
|
||||
testcase("test claim reward rate is > 1");
|
||||
|
||||
Env env{
|
||||
*this, makeNetworkConfig(21337), features - featureXahauGenesis};
|
||||
Env env{*this, envconfig(), features - featureXahauGenesis};
|
||||
|
||||
STAmount const feesXRP = XRP(1);
|
||||
|
||||
@@ -3906,8 +3828,7 @@ struct XahauGenesis_test : public beast::unit_test::suite
|
||||
using namespace jtx;
|
||||
testcase("test claim reward delay is == 0");
|
||||
|
||||
Env env{
|
||||
*this, makeNetworkConfig(21337), features - featureXahauGenesis};
|
||||
Env env{*this, envconfig(), features - featureXahauGenesis};
|
||||
|
||||
STAmount const feesXRP = XRP(1);
|
||||
|
||||
@@ -3952,8 +3873,7 @@ struct XahauGenesis_test : public beast::unit_test::suite
|
||||
using namespace jtx;
|
||||
testcase("test claim reward delay is < 0");
|
||||
|
||||
Env env{
|
||||
*this, makeNetworkConfig(21337), features - featureXahauGenesis};
|
||||
Env env{*this, envconfig(), features - featureXahauGenesis};
|
||||
|
||||
STAmount const feesXRP = XRP(1);
|
||||
|
||||
@@ -3998,8 +3918,7 @@ struct XahauGenesis_test : public beast::unit_test::suite
|
||||
using namespace jtx;
|
||||
testcase("test claim reward before time");
|
||||
|
||||
Env env{
|
||||
*this, makeNetworkConfig(21337), features - featureXahauGenesis};
|
||||
Env env{*this, envconfig(), features - featureXahauGenesis};
|
||||
|
||||
STAmount const feesXRP = XRP(1);
|
||||
|
||||
@@ -4049,8 +3968,7 @@ struct XahauGenesis_test : public beast::unit_test::suite
|
||||
using namespace std::chrono_literals;
|
||||
testcase("test claim reward valid without unl report");
|
||||
|
||||
Env env{
|
||||
*this, makeNetworkConfig(21337), features - featureXahauGenesis};
|
||||
Env env{*this, envconfig(), features - featureXahauGenesis};
|
||||
bool const has240819 = env.current()->rules().enabled(fix240819);
|
||||
|
||||
double const rateDrops = 0.00333333333 * 1'000'000;
|
||||
@@ -4197,8 +4115,7 @@ struct XahauGenesis_test : public beast::unit_test::suite
|
||||
using namespace std::chrono_literals;
|
||||
testcase("test claim reward valid with unl report");
|
||||
|
||||
Env env{
|
||||
*this, makeNetworkConfig(21337), features - featureXahauGenesis};
|
||||
Env env{*this, envconfig(), features - featureXahauGenesis};
|
||||
|
||||
double const rateDrops = 0.00333333333 * 1'000'000;
|
||||
STAmount const feesXRP = XRP(1);
|
||||
@@ -4333,7 +4250,7 @@ struct XahauGenesis_test : public beast::unit_test::suite
|
||||
{
|
||||
FeatureBitset _features = features - featureXahauGenesis;
|
||||
auto const amend = withXahauV1 ? _features : _features - fixXahauV1;
|
||||
Env env{*this, makeNetworkConfig(21337), amend};
|
||||
Env env{*this, envconfig(), amend};
|
||||
|
||||
double const rateDrops = 0.00333333333 * 1'000'000;
|
||||
STAmount const feesXRP = XRP(1);
|
||||
@@ -4470,8 +4387,7 @@ struct XahauGenesis_test : public beast::unit_test::suite
|
||||
using namespace std::chrono_literals;
|
||||
testcase("test claim reward optin optout");
|
||||
|
||||
Env env{
|
||||
*this, makeNetworkConfig(21337), features - featureXahauGenesis};
|
||||
Env env{*this, envconfig(), features - featureXahauGenesis};
|
||||
bool const has240819 = env.current()->rules().enabled(fix240819);
|
||||
|
||||
double const rateDrops = 0.00333333333 * 1'000'000;
|
||||
@@ -4583,8 +4499,7 @@ struct XahauGenesis_test : public beast::unit_test::suite
|
||||
using namespace std::chrono_literals;
|
||||
testcase("test claim reward bal == 1");
|
||||
|
||||
Env env{
|
||||
*this, makeNetworkConfig(21337), features - featureXahauGenesis};
|
||||
Env env{*this, envconfig(), features - featureXahauGenesis};
|
||||
|
||||
double const rateDrops = 0.00333333333 * 1'000'000;
|
||||
STAmount const feesXRP = XRP(1);
|
||||
@@ -4672,8 +4587,7 @@ struct XahauGenesis_test : public beast::unit_test::suite
|
||||
using namespace std::chrono_literals;
|
||||
testcase("test claim reward elapsed_since_last == 1");
|
||||
|
||||
Env env{
|
||||
*this, makeNetworkConfig(21337), features - featureXahauGenesis};
|
||||
Env env{*this, envconfig(), features - featureXahauGenesis};
|
||||
|
||||
double const rateDrops = 0.00333333333 * 1'000'000;
|
||||
STAmount const feesXRP = XRP(1);
|
||||
@@ -4754,8 +4668,7 @@ struct XahauGenesis_test : public beast::unit_test::suite
|
||||
using namespace std::chrono_literals;
|
||||
testcase("test claim reward elapsed_since_last == 0");
|
||||
|
||||
Env env{
|
||||
*this, makeNetworkConfig(21337), features - featureXahauGenesis};
|
||||
Env env{*this, envconfig(), features - featureXahauGenesis};
|
||||
|
||||
STAmount const feesXRP = XRP(1);
|
||||
|
||||
@@ -5016,8 +4929,7 @@ struct XahauGenesis_test : public beast::unit_test::suite
|
||||
using namespace std::chrono_literals;
|
||||
testcase("test compound interest over 12 claims");
|
||||
|
||||
Env env{
|
||||
*this, makeNetworkConfig(21337), features - featureXahauGenesis};
|
||||
Env env{*this, envconfig(), features - featureXahauGenesis};
|
||||
|
||||
double const rateDrops = 0.00333333333 * 1'000'000;
|
||||
STAmount const feesXRP = XRP(1);
|
||||
@@ -5115,8 +5027,7 @@ struct XahauGenesis_test : public beast::unit_test::suite
|
||||
using namespace std::chrono_literals;
|
||||
testcase("test deposit");
|
||||
|
||||
Env env{
|
||||
*this, makeNetworkConfig(21337), features - featureXahauGenesis};
|
||||
Env env{*this, envconfig(), features - featureXahauGenesis};
|
||||
|
||||
double const rateDrops = 0.00333333333 * 1'000'000;
|
||||
STAmount const feesXRP = XRP(1);
|
||||
@@ -5206,8 +5117,7 @@ struct XahauGenesis_test : public beast::unit_test::suite
|
||||
using namespace std::chrono_literals;
|
||||
testcase("test deposit withdraw");
|
||||
|
||||
Env env{
|
||||
*this, makeNetworkConfig(21337), features - featureXahauGenesis};
|
||||
Env env{*this, envconfig(), features - featureXahauGenesis};
|
||||
|
||||
double const rateDrops = 0.00333333333 * 1'000'000;
|
||||
STAmount const feesXRP = XRP(1);
|
||||
@@ -5299,8 +5209,7 @@ struct XahauGenesis_test : public beast::unit_test::suite
|
||||
using namespace std::chrono_literals;
|
||||
testcase("test deposit late");
|
||||
|
||||
Env env{
|
||||
*this, makeNetworkConfig(21337), features - featureXahauGenesis};
|
||||
Env env{*this, envconfig(), features - featureXahauGenesis};
|
||||
|
||||
double const rateDrops = 0.00333333333 * 1'000'000;
|
||||
STAmount const feesXRP = XRP(1);
|
||||
@@ -5390,8 +5299,7 @@ struct XahauGenesis_test : public beast::unit_test::suite
|
||||
using namespace std::chrono_literals;
|
||||
testcase("test deposit late withdraw");
|
||||
|
||||
Env env{
|
||||
*this, makeNetworkConfig(21337), features - featureXahauGenesis};
|
||||
Env env{*this, envconfig(), features - featureXahauGenesis};
|
||||
|
||||
double const rateDrops = 0.00333333333 * 1'000'000;
|
||||
STAmount const feesXRP = XRP(1);
|
||||
@@ -5484,8 +5392,7 @@ struct XahauGenesis_test : public beast::unit_test::suite
|
||||
using namespace std::chrono_literals;
|
||||
testcase("test no claim");
|
||||
|
||||
Env env{
|
||||
*this, makeNetworkConfig(21337), features - featureXahauGenesis};
|
||||
Env env{*this, envconfig(), features - featureXahauGenesis};
|
||||
|
||||
double const rateDrops = 0.00333333333 * 1'000'000;
|
||||
STAmount const feesXRP = XRP(1);
|
||||
@@ -5573,8 +5480,7 @@ struct XahauGenesis_test : public beast::unit_test::suite
|
||||
using namespace std::chrono_literals;
|
||||
testcase("test no claim late");
|
||||
|
||||
Env env{
|
||||
*this, makeNetworkConfig(21337), features - featureXahauGenesis};
|
||||
Env env{*this, envconfig(), features - featureXahauGenesis};
|
||||
|
||||
double const rateDrops = 0.00333333333 * 1'000'000;
|
||||
STAmount const feesXRP = XRP(1);
|
||||
@@ -5688,7 +5594,6 @@ struct XahauGenesis_test : public beast::unit_test::suite
|
||||
testGovernHookWithFeats(FeatureBitset features)
|
||||
{
|
||||
testPlainActivation(features);
|
||||
testBadNetworkIDActivation(features);
|
||||
testWithSignerList(features);
|
||||
testWithRegularKey(features);
|
||||
testGovernanceL1(features);
|
||||
|
||||
Reference in New Issue
Block a user