mirror of
https://github.com/XRPLF/rippled.git
synced 2026-07-30 18:40:28 +00:00
test: enable unit tests to work with variable reference fee (#5145)
Fix remaining unit tests to be able to process reference fee values other than 10.
This commit is contained in:
@@ -172,6 +172,7 @@ public:
|
||||
using namespace std::chrono_literals;
|
||||
using namespace jtx;
|
||||
Env env(*this);
|
||||
auto baseFee = env.current()->fees().base.drops();
|
||||
auto wsc = makeWSClient(env.app().config());
|
||||
Json::Value stream;
|
||||
|
||||
@@ -203,9 +204,9 @@ public:
|
||||
jv[jss::transaction][jss::TransactionType] //
|
||||
== jss::Payment &&
|
||||
jv[jss::transaction][jss::DeliverMax] //
|
||||
== "10000000010" &&
|
||||
== std::to_string(10000000000 + baseFee) &&
|
||||
jv[jss::transaction][jss::Fee] //
|
||||
== "10" &&
|
||||
== std::to_string(baseFee) &&
|
||||
jv[jss::transaction][jss::Sequence] //
|
||||
== 1;
|
||||
}));
|
||||
@@ -228,9 +229,9 @@ public:
|
||||
jv[jss::transaction][jss::TransactionType] //
|
||||
== jss::Payment &&
|
||||
jv[jss::transaction][jss::DeliverMax] //
|
||||
== "10000000010" &&
|
||||
== std::to_string(10000000000 + baseFee) &&
|
||||
jv[jss::transaction][jss::Fee] //
|
||||
== "10" &&
|
||||
== std::to_string(baseFee) &&
|
||||
jv[jss::transaction][jss::Sequence] //
|
||||
== 2;
|
||||
}));
|
||||
@@ -318,7 +319,10 @@ public:
|
||||
|
||||
using namespace std::chrono_literals;
|
||||
using namespace jtx;
|
||||
Env env(*this);
|
||||
Env env(*this, envconfig([](std::unique_ptr<Config> cfg) {
|
||||
cfg->FEES.reference_fee = 10;
|
||||
return cfg;
|
||||
}));
|
||||
auto wsc = makeWSClient(env.app().config());
|
||||
Json::Value stream{Json::objectValue};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user