Compare commits

...

1 Commits

Author SHA1 Message Date
Mayukha Vadari
f05f726c86 fix: More clang-tidy issues 2026-04-21 18:13:26 -04:00
59 changed files with 93 additions and 82 deletions

View File

@@ -92,7 +92,7 @@ public:
{
// Ensure the slice isn't a subset of the buffer.
XRPL_ASSERT(
s.size() == 0 || size_ == 0 || s.data() < p_.get() || s.data() >= p_.get() + size_,
s.empty() || size_ == 0 || s.data() < p_.get() || s.data() >= p_.get() + size_,
"xrpl::Buffer::operator=(Slice) : input not a subset");
if (auto p = alloc(s.size()))

View File

@@ -284,7 +284,7 @@ class SlabAllocatorSet
{
private:
// The list of allocators that belong to this set
boost::container::static_vector<SlabAllocator<Type>, 64> allocators_;
boost::container::static_vector<SlabAllocator<Type>, 64> allocators_{};
std::size_t maxSize_ = 0;

View File

@@ -197,7 +197,7 @@ private:
class KeyOnlyEntry
{
public:
clock_type::time_point last_access;
clock_type::time_point last_access{};
explicit KeyOnlyEntry(clock_type::time_point const& last_access_)
: last_access(last_access_)
@@ -215,7 +215,7 @@ private:
{
public:
shared_weak_combo_pointer_type ptr;
clock_type::time_point last_access;
clock_type::time_point last_access{};
ValueEntry(clock_type::time_point const& last_access_, shared_pointer_type const& ptr_)
: ptr(ptr_), last_access(last_access_)

View File

@@ -72,14 +72,12 @@ template <class HashAlgorithm = beast::xxhasher>
class hardened_hash
{
private:
detail::seed_pair m_seeds;
detail::seed_pair m_seeds{detail::make_seed_pair<>()};
public:
using result_type = typename HashAlgorithm::result_type;
hardened_hash() : m_seeds(detail::make_seed_pair<>())
{
}
hardened_hash() = default;
template <class T>
result_type

View File

@@ -57,7 +57,7 @@ public:
{
using iterator_category = std::forward_iterator_tag;
partition_map_type* map_{nullptr};
typename partition_map_type::iterator ait_;
typename partition_map_type::iterator ait_{};
typename map_type::iterator mit_;
iterator() = default;
@@ -126,7 +126,7 @@ public:
using iterator_category = std::forward_iterator_tag;
partition_map_type* map_{nullptr};
typename partition_map_type::iterator ait_;
typename partition_map_type::iterator ait_{};
typename map_type::iterator mit_;
const_iterator() = default;

View File

@@ -24,9 +24,7 @@ public:
using reference = std::
conditional_t<IsConst, typename Container::const_reference, typename Container::reference>;
LockFreeStackIterator() : m_node()
{
}
LockFreeStackIterator() = default;
LockFreeStackIterator(NodePtr node) : m_node(node)
{
@@ -79,7 +77,7 @@ public:
}
private:
NodePtr m_node;
NodePtr m_node{};
};
//------------------------------------------------------------------------------

View File

@@ -68,7 +68,7 @@ private:
std::size_t cases = 0;
std::size_t total = 0;
std::size_t failed = 0;
std::vector<run_time> top;
std::vector<run_time> top{};
typename clock_type::time_point start = clock_type::now();
void

View File

@@ -72,7 +72,7 @@ private:
{
private:
ClosureCounter& counter_;
std::remove_reference_t<Closure> closure_;
std::remove_reference_t<Closure> closure_{};
static_assert(
std::is_same_v<decltype(closure_(std::declval<Args_t>()...)), Ret_t>,

View File

@@ -163,7 +163,7 @@ public:
}
JobTypeInfo m_unknown;
Map m_map;
Map m_map{};
};
} // namespace xrpl

View File

@@ -93,7 +93,7 @@ private:
beast::Journal mutable journal_;
std::mutex mutable mutex_;
DatabaseCon* connection_{};
std::unordered_set<PeerReservation, beast::uhash<>, KeyEqual> table_;
std::unordered_set<PeerReservation, beast::uhash<>, KeyEqual> table_{};
};
} // namespace xrpl

View File

@@ -17,7 +17,7 @@ private:
DigestAwareReadView const& base_;
CachedSLEs& cache_;
std::mutex mutable mutex_;
std::unordered_map<key_type, uint256, hardened_hash<>> mutable map_;
std::unordered_map<key_type, uint256, hardened_hash<>> mutable map_{};
public:
CachedViewImpl() = delete;

View File

@@ -148,7 +148,7 @@ public:
}
private:
std::map<Key, std::shared_ptr<STTx const>> map_;
std::map<Key, std::shared_ptr<STTx const>> map_{};
// Used to salt the accounts so people can't mine for low account numbers
uint256 salt_;

View File

@@ -104,7 +104,7 @@ private:
std::optional<value_type> mutable cache_;
std::shared_ptr<SLE const> sle_;
STVector256 const* indexes_ = nullptr;
std::vector<uint256>::const_iterator it_;
std::vector<uint256>::const_iterator it_{};
};
} // namespace xrpl

View File

@@ -28,7 +28,7 @@ private:
using items_t = std::map<key_type, std::pair<Action, std::shared_ptr<SLE>>>;
items_t items_;
items_t items_{};
XRPAmount dropsDestroyed_{0};
public:

View File

@@ -101,7 +101,7 @@ private:
boost::container::pmr::polymorphic_allocator<std::pair<key_type const, sleAction>>>;
// monotonic_resource_ must outlive `items_`. Make a pointer so it may be
// easily moved.
std::unique_ptr<boost::container::pmr::monotonic_buffer_resource> monotonic_resource_;
std::unique_ptr<boost::container::pmr::monotonic_buffer_resource> monotonic_resource_{};
items_t items_;
XRPAmount dropsDestroyed_{0};

View File

@@ -102,7 +102,7 @@ public:
private:
ReadView const* view_ = nullptr;
std::unique_ptr<iter_base> impl_;
std::unique_ptr<iter_base> impl_{};
std::optional<value_type> mutable cache_;
};

View File

@@ -17,7 +17,7 @@ class Book final : public CountedObject<Book>
public:
Asset in;
Asset out;
std::optional<uint256> domain;
std::optional<uint256> domain{};
Book() = default;

View File

@@ -75,9 +75,7 @@ public:
Derived classes will load the object with all the known formats.
*/
private:
KnownFormats() : name_(beast::type_name<Derived>())
{
}
KnownFormats() = default;
public:
/** Destroy the known formats object.
@@ -174,15 +172,15 @@ protected:
}
private:
std::string name_;
std::string name_{beast::type_name<Derived>()};
// One of the situations where a std::forward_list is useful. We want to
// store each Item in a place where its address won't change. So a node-
// based container is appropriate. But we don't need searchability.
std::forward_list<Item> formats_;
std::forward_list<Item> formats_{};
boost::container::flat_map<std::string, Item const*> names_;
boost::container::flat_map<KeyType, Item const*> types_;
boost::container::flat_map<std::string, Item const*> names_{};
boost::container::flat_map<KeyType, Item const*> types_{};
friend Derived;
};

View File

@@ -10,7 +10,7 @@ namespace xrpl {
class PathAsset
{
private:
std::variant<Currency, MPTID> easset_;
std::variant<Currency, MPTID> easset_{};
public:
PathAsset() = default;

View File

@@ -10,7 +10,7 @@ class STArray final : public STBase, public CountedObject<STArray>
private:
using list_type = std::vector<STObject>;
list_type v_;
list_type v_{};
public:
using value_type = STObject;

View File

@@ -19,7 +19,7 @@ public:
using value_type = base_uint<Bits>;
private:
value_type value_;
value_type value_{};
public:
STBitString() = default;

View File

@@ -116,7 +116,7 @@ private:
class STPath final : public CountedObject<STPath>
{
std::vector<STPathElement> mPath;
std::vector<STPathElement> mPath{};
public:
STPath() = default;
@@ -171,7 +171,7 @@ public:
// A set of zero or more payment paths
class STPathSet final : public STBase, public CountedObject<STPathSet>
{
std::vector<STPath> value;
std::vector<STPath> value{};
public:
STPathSet() = default;

View File

@@ -94,7 +94,7 @@ public:
struct CheckpointerSetup
{
JobQueue* jobQueue;
JobQueue* jobQueue{};
std::reference_wrapper<ServiceRegistry> registry;
};

View File

@@ -475,8 +475,8 @@ private:
std::uint32_t generation_;
// nodes we have discovered to be missing
std::vector<std::pair<SHAMapNodeID, uint256>> missingNodes_;
std::set<SHAMapHash> missingHashes_;
std::vector<std::pair<SHAMapNodeID, uint256>> missingNodes_{};
std::set<SHAMapHash> missingHashes_{};
// nodes we are in the process of traversing
using StackEntry = std::tuple<
@@ -491,7 +491,7 @@ private:
// elements will not be invalidated during the course of element
// insertion and removal. Containers that do not offer this guarantee,
// such as std::vector, can't be used here.
std::stack<StackEntry, std::deque<StackEntry>> stack_;
std::stack<StackEntry, std::deque<StackEntry>> stack_{};
// nodes we may have acquired from deferred reads
using DeferredNode = std::tuple<
@@ -503,11 +503,11 @@ private:
int deferred_;
std::mutex deferLock_;
std::condition_variable deferCondVar_;
std::vector<DeferredNode> finishedReads_;
std::vector<DeferredNode> finishedReads_{};
// nodes we need to resume after we get their children from deferred
// reads
std::map<SHAMapInnerNode*, SHAMapNodeID> resumes_;
std::map<SHAMapInnerNode*, SHAMapNodeID> resumes_{};
MissingNodes(int max, SHAMapSyncFilter* filter, int maxDefer, std::uint32_t generation)
: max_(max), filter_(filter), maxDefer_(maxDefer), generation_(generation), deferred_(0)
@@ -589,7 +589,7 @@ public:
using pointer = value_type const*;
private:
SharedPtrNodeStack stack_;
SharedPtrNodeStack stack_{};
SHAMap const* map_ = nullptr;
pointer item_ = nullptr;

View File

@@ -42,10 +42,10 @@ public:
}
// For sorting to look for duplicate accounts
friend bool
operator<(SignerEntry const& lhs, SignerEntry const& rhs)
friend auto
operator<=>(SignerEntry const& lhs, SignerEntry const& rhs)
{
return lhs.account < rhs.account;
return lhs.account <=> rhs.account;
}
friend bool

View File

@@ -60,7 +60,7 @@ struct PreclaimContext
public:
std::reference_wrapper<ServiceRegistry> registry;
ReadView const& view;
TER preflightResult;
TER preflightResult{};
ApplyFlags flags;
STTx const& tx;
std::optional<uint256 const> const parentBatchId;

View File

@@ -11,7 +11,7 @@ class TxQ;
struct ApplyResult
{
TER ter;
TER ter{};
bool applied;
std::optional<TxMeta> metadata;
@@ -156,7 +156,7 @@ public:
beast::Journal const j;
/// Intermediate transaction result
NotTEC const ter;
NotTEC const ter{};
/// Constructor
template <class Context>
@@ -198,11 +198,11 @@ public:
beast::Journal const j;
/// Intermediate transaction result
TER const ter;
TER const ter{};
/// Success flag - whether the transaction is likely to
/// claim a fee
bool const likelyToClaimFee;
bool const likelyToClaimFee{};
/// Constructor
template <class Context>

View File

@@ -483,7 +483,7 @@ public:
class FlowException : public std::runtime_error
{
public:
TER ter;
TER ter{};
FlowException(TER t, std::string const& msg) : std::runtime_error(msg), ter(t)
{

View File

@@ -6,6 +6,7 @@
#include <xrpl/ledger/RawView.h>
#include <xrpl/ledger/ReadView.h>
#include <xrpl/protocol/AccountID.h>
#include <xrpl/protocol/Issue.h>
#include <xrpl/protocol/LedgerFormats.h>
#include <xrpl/protocol/MPTIssue.h>
#include <xrpl/protocol/SField.h>

View File

@@ -1,7 +1,6 @@
#include <xrpl/ledger/helpers/CredentialHelpers.h>
#include <xrpl/basics/Log.h>
#include <xrpl/basics/Slice.h>
#include <xrpl/basics/base_uint.h>
#include <xrpl/basics/chrono.h>
#include <xrpl/beast/utility/Journal.h>
@@ -10,11 +9,11 @@
#include <xrpl/ledger/helpers/AccountRootHelpers.h>
#include <xrpl/protocol/AccountID.h>
#include <xrpl/protocol/Indexes.h>
#include <xrpl/protocol/LedgerFormats.h>
#include <xrpl/protocol/Protocol.h>
#include <xrpl/protocol/SField.h>
#include <xrpl/protocol/STArray.h>
#include <xrpl/protocol/STLedgerEntry.h>
#include <xrpl/protocol/STObject.h>
#include <xrpl/protocol/STTx.h>
#include <xrpl/protocol/STVector256.h>
#include <xrpl/protocol/TER.h>
@@ -23,10 +22,6 @@
#include <cstdint>
#include <limits>
#include <memory>
#include <set>
#include <unordered_set>
#include <utility>
#include <vector>
namespace xrpl {
namespace credentials {

View File

@@ -24,6 +24,7 @@
#include <xrpl/protocol/SeqProxy.h>
#include <xrpl/protocol/TER.h>
#include <xrpl/protocol/TxFlags.h>
#include <xrpl/protocol/UintTypes.h>
#include <xrpl/protocol/XRPAmount.h>
#include <xrpl/protocol/nft.h>
#include <xrpl/protocol/nftPageMask.h>

View File

@@ -6,6 +6,7 @@
#include <xrpl/ledger/ApplyView.h>
#include <xrpl/ledger/helpers/AccountRootHelpers.h>
#include <xrpl/protocol/Indexes.h>
#include <xrpl/protocol/LedgerFormats.h>
#include <xrpl/protocol/SField.h>
#include <xrpl/protocol/STArray.h> // IWYU pragma: keep
#include <xrpl/protocol/STLedgerEntry.h>

View File

@@ -1,10 +1,12 @@
#include <xrpl/protocol/Quality.h>
#include <xrpl/beast/utility/Zero.h>
#include <xrpl/beast/utility/instrumentation.h>
#include <xrpl/protocol/Asset.h>
#include <xrpl/protocol/STAmount.h>
#include <cstdint>
#include <limits>
namespace xrpl {

View File

@@ -16,6 +16,7 @@
#include <cstdint>
#include <iterator>
#include <string>
#include <system_error>
namespace xrpl {

View File

@@ -5,6 +5,7 @@
#include <xrpl/beast/utility/instrumentation.h>
#include <xrpl/json/json_value.h>
#include <xrpl/protocol/Asset.h>
#include <xrpl/protocol/Rules.h>
#include <xrpl/protocol/SField.h>
#include <xrpl/protocol/STAmount.h>
#include <xrpl/protocol/STBase.h>

View File

@@ -6,6 +6,7 @@
#include <xrpl/basics/chrono.h>
#include <xrpl/beast/utility/instrumentation.h>
#include <xrpl/protocol/HashPrefix.h>
#include <xrpl/protocol/KeyType.h>
#include <xrpl/protocol/PublicKey.h>
#include <xrpl/protocol/SField.h>
#include <xrpl/protocol/SOTemplate.h>

View File

@@ -29,6 +29,7 @@
#include <xrpl/protocol/SField.h>
#include <xrpl/protocol/STLedgerEntry.h>
#include <xrpl/protocol/STTx.h>
#include <xrpl/protocol/Serializer.h>
#include <xrpl/protocol/SystemParameters.h>
#include <xrpl/protocol/TER.h>
#include <xrpl/protocol/TxFlags.h>

View File

@@ -256,7 +256,7 @@ SignerListSet::validateQuorumAndSignerEntries(
// Make sure there are no duplicate signers.
XRPL_ASSERT(
std::is_sorted(signers.begin(), signers.end()),
std::ranges::is_sorted(signers),
"xrpl::SignerListSet::validateQuorumAndSignerEntries : sorted "
"signers");
if (std::ranges::adjacent_find(signers) != signers.end())

View File

@@ -1,6 +1,7 @@
#include <xrpl/tx/transactors/delegate/DelegateSet.h>
#include <xrpl/basics/Log.h>
#include <xrpl/beast/utility/Journal.h>
#include <xrpl/core/ServiceRegistry.h>
#include <xrpl/ledger/helpers/AccountRootHelpers.h>
#include <xrpl/ledger/helpers/DirectoryHelpers.h>
@@ -12,9 +13,7 @@
#include <xrpl/protocol/TER.h>
#include <xrpl/tx/Transactor.h>
#include <cstdint>
#include <memory>
#include <unordered_set>
namespace xrpl {

View File

@@ -1,11 +1,13 @@
#include <xrpl/tx/transactors/lending/LoanDelete.h>
#include <xrpl/basics/Log.h>
#include <xrpl/basics/Number.h>
#include <xrpl/beast/utility/Zero.h>
#include <xrpl/beast/utility/instrumentation.h>
#include <xrpl/ledger/helpers/AccountRootHelpers.h>
#include <xrpl/protocol/Indexes.h>
#include <xrpl/protocol/SField.h>
#include <xrpl/protocol/STAmount.h>
#include <xrpl/protocol/STTakesAsset.h>
#include <xrpl/protocol/TER.h>
#include <xrpl/tx/Transactor.h>

View File

@@ -1,10 +1,8 @@
#include <xrpl/tx/transactors/nft/NFTokenMint.h>
#include <xrpl/basics/Expected.h>
#include <xrpl/basics/base_uint.h>
#include <xrpl/beast/utility/instrumentation.h>
#include <xrpl/ledger/View.h>
#include <xrpl/ledger/helpers/NFTokenHelpers.h>
#include <xrpl/protocol/AccountID.h>
#include <xrpl/protocol/Feature.h>
#include <xrpl/protocol/Indexes.h>
@@ -12,6 +10,7 @@
#include <xrpl/protocol/Protocol.h>
#include <xrpl/protocol/SField.h>
#include <xrpl/protocol/SOTemplate.h>
#include <xrpl/protocol/STObject.h>
#include <xrpl/protocol/TER.h>
#include <xrpl/protocol/TxFlags.h>
#include <xrpl/protocol/nft.h>
@@ -22,7 +21,7 @@
#include <array>
#include <cstdint>
#include <cstring>
#include <utility>
#include <iterator>
namespace xrpl {

View File

@@ -19,6 +19,7 @@
#include <xrpl/basics/chrono.h>
#include <xrpl/basics/strHex.h>
#include <xrpl/beast/unit_test/suite.h>
#include <xrpl/beast/utility/Zero.h>
#include <xrpl/core/ServiceRegistry.h>
#include <xrpl/json/json_value.h>
#include <xrpl/json/to_string.h>
@@ -41,16 +42,13 @@
#include <algorithm>
#include <cassert>
#include <chrono>
#include <cstddef>
#include <cstdint>
#include <iterator>
#include <memory>
#include <optional>
#include <set>
#include <string>
#include <utility>
#include <vector>
namespace xrpl::test {
using namespace jtx::paychan;

View File

@@ -7,6 +7,7 @@
#include <xrpl/basics/BasicConfig.h>
#include <xrpl/beast/unit_test/suite.h>
#include <xrpl/beast/utility/temp_dir.h>
#include <xrpl/protocol/SystemParameters.h>
#include <xrpl/server/Port.h>
#include <boost/filesystem/operations.hpp>

View File

@@ -145,10 +145,10 @@ private:
struct AppBundle
{
Application* app = nullptr;
std::unique_ptr<Application> owned;
std::unique_ptr<Application> owned{};
ManualTimeKeeper* timeKeeper = nullptr;
std::thread thread;
std::unique_ptr<AbstractClient> client;
std::unique_ptr<AbstractClient> client{};
AppBundle() = default;
AppBundle(
@@ -838,7 +838,7 @@ protected:
}
// Map of account IDs to Account
std::unordered_map<AccountID, Account> map_;
std::unordered_map<AccountID, Account> map_{};
};
template <class... Args>

View File

@@ -22,7 +22,7 @@ class Env;
struct JTx
{
Json::Value jv;
requires_t require;
requires_t require{};
std::optional<TER> ter = TER{tesSUCCESS};
std::optional<std::pair<error_code_i, std::string>> rpcCode = std::nullopt;
std::optional<std::pair<std::string, std::optional<std::string>>> rpcException = std::nullopt;
@@ -32,10 +32,10 @@ struct JTx
bool fill_netid = true;
std::shared_ptr<STTx const> stx;
// Functions that sign the transaction from the Account
std::vector<std::function<void(Env&, JTx&)>> mainSigners;
std::vector<std::function<void(Env&, JTx&)>> mainSigners{};
// Functions that sign something else after the mainSigners, such as
// sfCounterpartySignature
std::vector<std::function<void(Env&, JTx&)>> postSigners;
std::vector<std::function<void(Env&, JTx&)>> postSigners{};
JTx() = default;
JTx(JTx const&) = default;
@@ -144,7 +144,7 @@ private:
prop_list&
operator=(prop_list&& src) = default;
std::vector<std::unique_ptr<basic_prop>> list;
std::vector<std::unique_ptr<basic_prop>> list{};
};
prop_list props_;

View File

@@ -9,7 +9,7 @@ namespace xrpl::test {
class ManualTimeKeeper : public TimeKeeper
{
private:
std::atomic<time_point> now_;
std::atomic<time_point> now_{};
public:
ManualTimeKeeper() = default;

View File

@@ -37,7 +37,7 @@ public:
class ids
{
private:
std::vector<std::string> const credentials_;
std::vector<std::string> const credentials_{};
public:
explicit ids(std::vector<std::string> const& creds) : credentials_(creds)

View File

@@ -12,6 +12,7 @@
#include <cstdint>
#include <iomanip>
#include <ios>
#include <limits>
#include <ostream>
#include <sstream>
#include <string>

View File

@@ -12,7 +12,7 @@ namespace xrpl::test::jtx {
class ter
{
private:
std::optional<TER> v_;
std::optional<TER> v_{};
public:
explicit ter(decltype(std::ignore))

View File

@@ -8,6 +8,7 @@
#include <xrpl/beast/unit_test/suite.h>
#include <xrpl/json/json_value.h>
#include <xrpl/protocol/Protocol.h>
#include <xrpl/protocol/SField.h>
#include <xrpl/protocol/TxFlags.h>
#include <xrpl/protocol/jss.h>

View File

@@ -13,8 +13,10 @@
#include <xrpl/ledger/Ledger.h>
#include <xrpl/ledger/OpenView.h>
#include <xrpl/nodestore/NodeObject.h>
#include <xrpl/protocol/Indexes.h>
#include <xrpl/protocol/LedgerHeader.h>
#include <xrpl/protocol/Protocol.h>
#include <xrpl/protocol/SystemParameters.h>
#include <xrpl/tx/apply.h>
#include <cstddef>

View File

@@ -21,9 +21,11 @@
#include <xrpl/nodestore/Database.h>
#include <xrpl/nodestore/NodeObject.h>
#include <xrpl/protocol/HashPrefix.h>
#include <xrpl/protocol/Indexes.h>
#include <xrpl/protocol/LedgerHeader.h>
#include <xrpl/protocol/Rules.h>
#include <xrpl/protocol/Serializer.h>
#include <xrpl/protocol/SystemParameters.h>
#include <xrpl/protocol/jss.h>
#include <xrpl/resource/Fees.h>
#include <xrpl/shamap/SHAMapNodeID.h>

View File

@@ -8,7 +8,9 @@
#include <xrpl/core/JobQueue.h>
#include <xrpl/core/ServiceRegistry.h>
#include <xrpl/ledger/PendingSaves.h>
#include <xrpl/protocol/Indexes.h>
#include <xrpl/protocol/Rules.h>
#include <xrpl/protocol/SystemParameters.h>
#include <xrpl/rdb/RelationalDatabase.h>
#include <cstdint>

View File

@@ -14,6 +14,7 @@
#include <xrpl/ledger/OpenView.h>
#include <xrpl/ledger/ReadView.h>
#include <xrpl/protocol/Rules.h>
#include <xrpl/protocol/SField.h>
#include <xrpl/protocol/STObject.h>
#include <xrpl/protocol/STTx.h>
#include <xrpl/protocol/Serializer.h>

View File

@@ -78,9 +78,11 @@
#include <xrpl/protocol/ApiVersion.h>
#include <xrpl/protocol/BuildInfo.h>
#include <xrpl/protocol/Feature.h>
#include <xrpl/protocol/Indexes.h>
#include <xrpl/protocol/Protocol.h>
#include <xrpl/protocol/STParsedJSON.h>
#include <xrpl/protocol/Serializer.h>
#include <xrpl/protocol/SystemParameters.h>
#include <xrpl/protocol/jss.h>
#include <xrpl/rdb/DatabaseCon.h>
#include <xrpl/resource/Charge.h>

View File

@@ -8,6 +8,7 @@
#include <xrpl/ledger/ReadView.h>
#include <xrpl/protocol/Feature.h>
#include <xrpl/protocol/Fees.h>
#include <xrpl/protocol/Protocol.h>
#include <xrpl/protocol/SField.h>
#include <xrpl/protocol/STTx.h>
#include <xrpl/protocol/STValidation.h>

View File

@@ -224,14 +224,14 @@ public:
`rules` change between attempts, `preflight` will be run again
in `TxQ::MaybeTx::apply`.
*/
TER preflightResult;
TER preflightResult{};
/** If the transactor attempted to apply the transaction to the open
ledger from the queue and *failed*, then this is the transactor
result from the last attempt. Should never be a `tec`, `tef`,
`tem`, or `tesSUCCESS`, because those results cause the
transaction to be removed from the queue.
*/
std::optional<TER> lastResult;
std::optional<TER> lastResult{};
};
/// Constructor
@@ -367,7 +367,7 @@ private:
std::size_t txnsExpected_;
/// Recent history of transaction counts that
/// exceed the targetTxnCount_
boost::circular_buffer<std::size_t> recentTxnCounts_;
boost::circular_buffer<std::size_t> recentTxnCounts_{};
/// Based on the median fee of the LCL. Used
/// when fee escalation kicks in.
FeeLevel64 escalationMultiplier_;
@@ -415,7 +415,7 @@ private:
// Number of transactions expected per ledger.
// One more than this value will be accepted
// before escalation kicks in.
std::size_t const txnsExpected;
std::size_t const txnsExpected{};
// Based on the median fee of the LCL. Used
// when fee escalation kicks in.
FeeLevel64 const escalationMultiplier;

View File

@@ -1,6 +1,7 @@
#include <xrpld/app/misc/ValidatorList.h>
#include <xrpld/core/TimeKeeper.h>
#include <xrpld/overlay/Message.h>
#include <xrpld/overlay/Overlay.h>
#include <xrpld/overlay/Peer.h>

View File

@@ -18,6 +18,7 @@
#include <xrpl/protocol/AccountID.h>
#include <xrpl/protocol/Asset.h>
#include <xrpl/protocol/ErrorCodes.h>
#include <xrpl/protocol/Feature.h>
#include <xrpl/protocol/Indexes.h>
#include <xrpl/protocol/SField.h>
#include <xrpl/protocol/STAmount.h>