Compare commits

...

1 Commits

Author SHA1 Message Date
Denis Angell
44d7d6fef7 fix warnings 2025-04-30 09:41:52 +02:00
13 changed files with 18 additions and 39 deletions

View File

@@ -199,7 +199,7 @@ public:
strOperatingMode(bool const admin = false) const override;
StateAccounting::CounterData
getStateAccountingData();
getStateAccountingData() override;
//
// Transaction operations.
@@ -711,10 +711,10 @@ private:
std::mutex validationsMutex_;
RCLConsensus&
getConsensus();
getConsensus() override;
LedgerMaster&
getLedgerMaster();
getLedgerMaster() override;
private:
struct Stats

View File

@@ -296,8 +296,6 @@ SHAMapStoreImp::run()
fullBelowCache_ = &(*app_.getNodeFamily().getFullBelowCache(0));
treeNodeCache_ = &(*app_.getNodeFamily().getTreeNodeCache(0));
bool const isMem = app_.config().mem_backend();
if (advisoryDelete_)
canDelete_ = state_db_.getCanDelete();

View File

@@ -52,8 +52,6 @@ private:
};
Application& app_;
Config const& config_;
JobQueue& jobQueue_;
boost::unordered::concurrent_flat_map<LedgerIndex, LedgerData> ledgers_;
boost::unordered::
@@ -67,7 +65,7 @@ private:
public:
FlatmapDatabase(Application& app, Config const& config, JobQueue& jobQueue)
: app_(app), config_(config), jobQueue_(jobQueue)
: app_(app)
{
}

View File

@@ -794,7 +794,6 @@ public:
// reached before the result set has been exhausted (we always query for
// one more than the limit), then we return an opaque marker that can be
// supplied in a subsequent query.
std::uint32_t queryLimit = numberOfResults + 1;
std::uint32_t findLedger = 0, findSeq = 0;
if (lookingForMarker)

View File

@@ -446,8 +446,8 @@ EscrowFinish::preflight(PreflightContext const& ctx)
{
if ((!ctx.tx.isFieldPresent(sfEscrowID) &&
!ctx.tx.isFieldPresent(sfOfferSequence)) ||
ctx.tx.isFieldPresent(sfEscrowID) &&
ctx.tx.isFieldPresent(sfOfferSequence))
(ctx.tx.isFieldPresent(sfEscrowID) &&
ctx.tx.isFieldPresent(sfOfferSequence)))
return temMALFORMED;
}
@@ -729,8 +729,8 @@ EscrowCancel::preflight(PreflightContext const& ctx)
{
if ((!ctx.tx.isFieldPresent(sfEscrowID) &&
!ctx.tx.isFieldPresent(sfOfferSequence)) ||
ctx.tx.isFieldPresent(sfEscrowID) &&
ctx.tx.isFieldPresent(sfOfferSequence))
(ctx.tx.isFieldPresent(sfEscrowID) &&
ctx.tx.isFieldPresent(sfOfferSequence)))
return temMALFORMED;
}

View File

@@ -924,9 +924,8 @@ Reader::getLocationLineAndColumn(Location location) const
{
int line, column;
getLocationLineAndColumn(location, line, column);
char buffer[18 + 16 + 16 + 1];
sprintf(buffer, "Line %d, Column %d", line, column);
return buffer;
return "Line " + std::to_string(line) + ", Column " +
std::to_string(column);
}
std::string

View File

@@ -24,7 +24,11 @@
#include <ripple/core/Config.h>
#include <boost/asio/io_service.hpp>
#include <boost/asio/streambuf.hpp>
#include <chrono>
#include <deque>
#include <functional>
#include <string>
namespace ripple {

View File

@@ -25,7 +25,9 @@
#include <ripple/beast/rfc2616.h>
#include <ripple/overlay/impl/Handshake.h>
#include <ripple/protocol/digest.h>
#include <boost/regex.hpp>
#include <algorithm>
#include <chrono>

View File

@@ -24,6 +24,7 @@
#include <ripple/protocol/impl/secp256k1.h>
#include <boost/multiprecision/cpp_int.hpp>
#include <ed25519-donna/ed25519.h>
#include <type_traits>
namespace ripple {

View File

@@ -499,11 +499,6 @@ ServerHandlerImp::processUDP(
return jr;
}
auto required = RPC::roleRequired(
apiVersion,
app_.config().BETA_RPC_API,
jv.isMember(jss::command) ? jv[jss::command].asString()
: jv[jss::method].asString());
if (Role::FORBID == role)
{
jr[jss::result] = rpcError(rpcFORBIDDEN);

View File

@@ -1110,7 +1110,6 @@ public:
env.fund(XRP(10000000), bob);
auto const preHookCount = (*env.le(alice))[sfHookStateCount];
auto const preOwnerCount = (*env.le(alice))[sfOwnerCount];
std::string hook =
"0061736D01000000012A0660057F7F7F7F7F017E60027F7F017E60027F7F017F60"

View File

@@ -643,7 +643,7 @@ private:
auto const sleep_sec =
boost::lexical_cast<unsigned int>(path.substr(7));
std::this_thread::sleep_for(
std::chrono::seconds{sleep_sec});
std::chrono::seconds(sleep_sec));
}
else if (boost::starts_with(path, "/redirect"))
{

View File

@@ -110,14 +110,6 @@ public:
}
// test errors on marker
{
auto const key = uint256::fromVoid(
(std::array<uint8_t, 32>{
0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U,
0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U,
0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U,
0x00U, 0x00U, 0x00U, 0x00U, 'k', 'e', 'y', 0x00U})
.data());
auto const ns = uint256::fromVoid(
(std::array<uint8_t, 32>{
0xCAU, 0xFEU, 0xCAU, 0xFEU, 0xCAU, 0xFEU, 0xCAU, 0xFEU,
@@ -126,14 +118,6 @@ public:
0xCAU, 0xFEU, 0xCAU, 0xFEU, 0xCAU, 0xFEU, 0xCAU, 0xFEU})
.data());
auto const nons = uint256::fromVoid(
(std::array<uint8_t, 32>{
0xCAU, 0xFEU, 0xCAU, 0xFEU, 0xCAU, 0xFEU, 0xCAU, 0xFEU,
0xCAU, 0xFEU, 0xCAU, 0xFEU, 0xCAU, 0xFEU, 0xCAU, 0xFEU,
0xCAU, 0xFEU, 0xCAU, 0xFEU, 0xCAU, 0xFEU, 0xCAU, 0xFEU,
0xCAU, 0xFEU, 0xCAU, 0xFEU, 0xCAU, 0xFEU, 0xCAU, 0xFFU})
.data());
// Lambda to create a hook.
auto setHook = [](test::jtx::Account const& account) {
std::string const createCodeHex =