mirror of
https://github.com/XRPLF/rippled.git
synced 2026-08-22 14:50:54 +00:00
style: More clang-tidy identifier renaming (#7290)
This commit is contained in:
@@ -213,9 +213,9 @@ AMMTest::pathTestEnv()
|
||||
// different from the current defaults. This function creates an env
|
||||
// with the search parameters that the tests were written for.
|
||||
return Env(*this, envconfig([](std::unique_ptr<Config> cfg) {
|
||||
cfg->PATH_SEARCH_OLD = 7;
|
||||
cfg->PATH_SEARCH = 7;
|
||||
cfg->PATH_SEARCH_MAX = 10;
|
||||
cfg->pathSearchOld = 7;
|
||||
cfg->pathSearch = 7;
|
||||
cfg->pathSearchMax = 10;
|
||||
return cfg;
|
||||
}));
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ Env::AppBundle::AppBundle(
|
||||
timeKeeper = tk.get();
|
||||
// Hack so we don't have to call Config::setup
|
||||
HTTPClient::initializeSSLContext(
|
||||
config->SSL_VERIFY_DIR, config->SSL_VERIFY_FILE, config->SSL_VERIFY, debugLog());
|
||||
config->sslVerifyDir, config->sslVerifyFile, config->sslVerify, debugLog());
|
||||
owned = makeApplication(std::move(config), std::move(logs), std::move(tk));
|
||||
app = owned.get();
|
||||
app->getLogs().threshold(thresh);
|
||||
|
||||
@@ -81,11 +81,11 @@ class JSONRPCClient : public AbstractClient
|
||||
boost::asio::ip::tcp::socket stream_;
|
||||
boost::beast::multi_buffer bin_;
|
||||
boost::beast::multi_buffer bout_;
|
||||
unsigned rpc_version_;
|
||||
unsigned rpcVersion_;
|
||||
|
||||
public:
|
||||
explicit JSONRPCClient(Config const& cfg, unsigned rpcVersion)
|
||||
: ep_(getEndpoint(cfg)), stream_(ios_), rpc_version_(rpcVersion)
|
||||
: ep_(getEndpoint(cfg)), stream_(ios_), rpcVersion_(rpcVersion)
|
||||
{
|
||||
stream_.connect(ep_);
|
||||
}
|
||||
@@ -116,7 +116,7 @@ public:
|
||||
{
|
||||
json::Value jr;
|
||||
jr[jss::method] = cmd;
|
||||
if (rpc_version_ == 2)
|
||||
if (rpcVersion_ == 2)
|
||||
{
|
||||
jr[jss::jsonrpc] = "2.0";
|
||||
jr[jss::ripplerpc] = "2.0";
|
||||
@@ -148,7 +148,7 @@ public:
|
||||
[[nodiscard]] unsigned
|
||||
version() const override
|
||||
{
|
||||
return rpc_version_;
|
||||
return rpcVersion_;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -172,9 +172,9 @@ pathTestEnv(beast::unit_test::Suite& suite)
|
||||
// with the search parameters that the tests were written for.
|
||||
using namespace jtx;
|
||||
return Env(suite, envconfig([](std::unique_ptr<Config> cfg) {
|
||||
cfg->PATH_SEARCH_OLD = 7;
|
||||
cfg->PATH_SEARCH = 7;
|
||||
cfg->PATH_SEARCH_MAX = 10;
|
||||
cfg->pathSearchOld = 7;
|
||||
cfg->pathSearch = 7;
|
||||
cfg->pathSearchMax = 10;
|
||||
return cfg;
|
||||
}));
|
||||
}
|
||||
|
||||
@@ -120,7 +120,7 @@ class WSClientImpl : public WSClient
|
||||
std::condition_variable cv_;
|
||||
std::list<std::shared_ptr<Msg>> msgs_;
|
||||
|
||||
unsigned rpc_version_;
|
||||
unsigned rpcVersion_;
|
||||
|
||||
void
|
||||
cleanup()
|
||||
@@ -157,7 +157,7 @@ public:
|
||||
, thread_([&] { ios_.run(); })
|
||||
, stream_(ios_)
|
||||
, ws_(stream_)
|
||||
, rpc_version_(rpcVersion)
|
||||
, rpcVersion_(rpcVersion)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -197,7 +197,7 @@ public:
|
||||
json::Value jp;
|
||||
if (params)
|
||||
jp = params;
|
||||
if (rpc_version_ == 2)
|
||||
if (rpcVersion_ == 2)
|
||||
{
|
||||
jp[jss::method] = cmd;
|
||||
jp[jss::jsonrpc] = "2.0";
|
||||
@@ -284,7 +284,7 @@ public:
|
||||
[[nodiscard]] unsigned
|
||||
version() const override
|
||||
{
|
||||
return rpc_version_;
|
||||
return rpcVersion_;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
@@ -20,12 +20,12 @@ setupConfigForUnitTests(Config& cfg)
|
||||
using namespace jtx;
|
||||
// Default fees to old values, so tests don't have to worry about changes in
|
||||
// Config.h
|
||||
cfg.FEES.reference_fee = UNIT_TEST_REFERENCE_FEE;
|
||||
cfg.FEES.account_reserve = XRP(200).value().xrp().drops();
|
||||
cfg.FEES.owner_reserve = XRP(50).value().xrp().drops();
|
||||
cfg.fees.referenceFee = UNIT_TEST_REFERENCE_FEE;
|
||||
cfg.fees.accountReserve = XRP(200).value().xrp().drops();
|
||||
cfg.fees.ownerReserve = XRP(50).value().xrp().drops();
|
||||
|
||||
// The Beta API (currently v2) is always available to tests
|
||||
cfg.BETA_RPC_API = true;
|
||||
cfg.betaRpcApi = true;
|
||||
|
||||
cfg.overwrite(ConfigSection::nodeDatabase(), "type", "memory");
|
||||
cfg.overwrite(ConfigSection::nodeDatabase(), "path", "main");
|
||||
@@ -54,7 +54,7 @@ setupConfigForUnitTests(Config& cfg)
|
||||
cfg[PORT_WS].set("admin", getEnvLocalhostAddr());
|
||||
cfg[PORT_WS].set("port", "0");
|
||||
cfg[PORT_WS].set("protocol", "ws");
|
||||
cfg.SSL_VERIFY = false;
|
||||
cfg.sslVerify = false;
|
||||
}
|
||||
|
||||
namespace jtx {
|
||||
@@ -96,7 +96,7 @@ secureGatewayLocalnet(std::unique_ptr<Config> cfg)
|
||||
std::unique_ptr<Config>
|
||||
singleThreadIo(std::unique_ptr<Config> cfg)
|
||||
{
|
||||
cfg->IO_WORKERS = 1;
|
||||
cfg->ioWorkers = 1;
|
||||
return cfg;
|
||||
}
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ PermissionedDEX::PermissionedDEX(Env& env)
|
||||
, alice("permdex-alice")
|
||||
, bob("permdex-bob")
|
||||
, carol("permdex-carol")
|
||||
, USD(gw["USD"])
|
||||
, usd(gw["USD"])
|
||||
, credType("permdex-abcde")
|
||||
{
|
||||
// Fund accounts
|
||||
@@ -59,10 +59,10 @@ PermissionedDEX::PermissionedDEX(Env& env)
|
||||
|
||||
for (auto const& account : {alice, bob, carol, domainOwner})
|
||||
{
|
||||
env.trust(USD(1000), account);
|
||||
env.trust(usd(1000), account);
|
||||
env.close();
|
||||
|
||||
env(pay(gw, account, USD(100)));
|
||||
env(pay(gw, account, usd(100)));
|
||||
env.close();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -396,7 +396,7 @@ XChainBridgeObjects::XChainBridgeObjects()
|
||||
}
|
||||
return result;
|
||||
}())
|
||||
, alt_signers([] {
|
||||
, altSigners([] {
|
||||
static constexpr int kNumSigners = kUtXchainDefaultNumSigners;
|
||||
std::vector<Signer> result;
|
||||
result.reserve(kNumSigners);
|
||||
@@ -431,17 +431,16 @@ XChainBridgeObjects::XChainBridgeObjects()
|
||||
return r;
|
||||
}())
|
||||
, reward(XRP(1))
|
||||
, split_reward_quorum(divide(reward, STAmount(kUtXchainDefaultQuorum), reward.get<Issue>()))
|
||||
, split_reward_everyone(
|
||||
divide(reward, STAmount(kUtXchainDefaultNumSigners), reward.get<Issue>()))
|
||||
, tiny_reward(drops(37))
|
||||
, tiny_reward_split(
|
||||
(divide(tiny_reward, STAmount(kUtXchainDefaultQuorum), tiny_reward.get<Issue>())))
|
||||
, tiny_reward_remainder(
|
||||
tiny_reward -
|
||||
multiply(tiny_reward_split, STAmount(kUtXchainDefaultQuorum), tiny_reward.get<Issue>()))
|
||||
, one_xrp(XRP(1))
|
||||
, xrp_dust(divide(one_xrp, STAmount(10000), one_xrp.get<Issue>()))
|
||||
, splitRewardQuorum(divide(reward, STAmount(kUtXchainDefaultQuorum), reward.get<Issue>()))
|
||||
, splitRewardEveryone(divide(reward, STAmount(kUtXchainDefaultNumSigners), reward.get<Issue>()))
|
||||
, tinyReward(drops(37))
|
||||
, tinyRewardSplit(
|
||||
(divide(tinyReward, STAmount(kUtXchainDefaultQuorum), tinyReward.get<Issue>())))
|
||||
, tinyRewardRemainder(
|
||||
tinyReward -
|
||||
multiply(tinyRewardSplit, STAmount(kUtXchainDefaultQuorum), tinyReward.get<Issue>()))
|
||||
, oneXrp(XRP(1))
|
||||
, xrpDust(divide(oneXrp, STAmount(10000), oneXrp.get<Issue>()))
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ public:
|
||||
Account alice;
|
||||
Account bob;
|
||||
Account carol;
|
||||
IOU USD;
|
||||
IOU usd;
|
||||
uint256 domainID;
|
||||
std::string credType;
|
||||
|
||||
|
||||
@@ -165,21 +165,21 @@ struct XChainBridgeObjects
|
||||
|
||||
FeatureBitset const features;
|
||||
std::vector<Signer> const signers;
|
||||
std::vector<Signer> const alt_signers;
|
||||
std::vector<Signer> const altSigners;
|
||||
std::vector<Account> const payee;
|
||||
std::vector<Account> const payees;
|
||||
std::uint32_t const quorum{kUtXchainDefaultQuorum};
|
||||
|
||||
STAmount const reward; // 1 xrp
|
||||
STAmount const split_reward_quorum; // 250,000 drops
|
||||
STAmount const split_reward_everyone; // 200,000 drops
|
||||
STAmount const reward; // 1 xrp
|
||||
STAmount const splitRewardQuorum; // 250,000 drops
|
||||
STAmount const splitRewardEveryone; // 200,000 drops
|
||||
|
||||
STAmount const tiny_reward; // 37 drops
|
||||
STAmount const tiny_reward_split; // 9 drops
|
||||
STAmount const tiny_reward_remainder; // 1 drops
|
||||
STAmount const tinyReward; // 37 drops
|
||||
STAmount const tinyRewardSplit; // 9 drops
|
||||
STAmount const tinyRewardRemainder; // 1 drops
|
||||
|
||||
STAmount const one_xrp;
|
||||
STAmount const xrp_dust;
|
||||
STAmount const oneXrp;
|
||||
STAmount const xrpDust;
|
||||
|
||||
static constexpr int kDropPerXrp = 1000000;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user