more unit test fixes

This commit is contained in:
Richard Holland
2023-09-24 19:51:04 +00:00
parent d7e4ba8254
commit dd6e21c38b
4 changed files with 15 additions and 12 deletions

View File

@@ -1231,7 +1231,7 @@ Import::doApply()
sle->setFieldU32(sfSequence, seqno);
sle->setFieldU32(sfOwnerCount, 0);
if (sleFees)
if (sleFees && view().rules().enabled(featureXahauGenesis))
{
uint64_t accIdx = sleFees->isFieldPresent(sfAccountCount) ? sleFees->getFieldU64(sfAccountCount) : 0;
sle->setFieldU64(sfAccountIndex, accIdx);

View File

@@ -344,7 +344,7 @@ Payment::doApply()
sleDst->setFieldU32(sfSequence, seqno);
auto sleFees = view().peek(keylet::fees());
if (sleFees)
if (sleFees && view().rules().enabled(featureXahauGenesis))
{
auto actIdx = sleFees->isFieldPresent(sfAccountCount) ? sleFees->getFieldU64(sfAccountCount) : 0;
sleDst->setFieldU64(sfAccountIndex, actIdx);

View File

@@ -156,6 +156,7 @@ public:
// unfunded
{
Env env(*this);
env.memoize(alice);
env(pay("alice", "bob", XRP(1000)),
seq(1),
fee(10),
@@ -610,16 +611,16 @@ public:
using namespace jtx;
Env env(*this);
env.fund(XRP(10000), "alice");
env(noop("alice"), memodata("data"));
env(noop("alice"), memoformat("format"));
env(noop("alice"), memotype("type"));
env(noop("alice"), memondata("format", "type"));
env(noop("alice"), memonformat("data", "type"));
env(noop("alice"), memontype("data", "format"));
env(noop("alice"), memo("data", "format", "type"));
env(noop("alice"), memodata("data"), fee(1000));
env(noop("alice"), memoformat("format"), fee(1000));
env(noop("alice"), memotype("type"), fee(1000));
env(noop("alice"), memondata("format", "type"), fee(1000));
env(noop("alice"), memonformat("data", "type"), fee(1000));
env(noop("alice"), memontype("data", "format"), fee(1000));
env(noop("alice"), memo("data", "format", "type"), fee(1000));
env(noop("alice"),
memo("data1", "format1", "type1"),
memo("data2", "format2", "type2"));
memo("data2", "format2", "type2"), fee(10000));
}
void

View File

@@ -290,7 +290,7 @@ public:
{
testcase("ledger_entry Request AccountRoot");
using namespace test::jtx;
Env env{*this};
Env env{*this, supported_amendments() - featureXahauGenesis};
Account const alice{"alice"};
env.fund(XRP(10000), alice);
env.close();
@@ -322,6 +322,7 @@ public:
"73A995B477E92EC229F99CED5B62BF4D2ACE4DC42719103AE2F6240000002"
"540BE4008114AE123A8556F3CF91154711376AFB0F894F832B3D"};
// Request alice's account root, but with binary == true;
Json::Value jvParams;
jvParams[jss::account_root] = alice.human();
@@ -1631,6 +1632,7 @@ public:
using namespace test::jtx;
Env env{*this, FeatureBitset{}}; // hashes requested below assume
// no amendments
env.fund(XRP(10000), "alice");
env.close();
env.fund(XRP(10000), "bob");
@@ -1847,7 +1849,7 @@ public:
section.set("minimum_txn_in_ledger_standalone", "3");
section.set("normal_consensus_increase_percent", "0");
return cfg;
})};
}), supported_amendments() - featureXahauGenesis};
Json::Value jv;
jv[jss::ledger_index] = "current";