mirror of
https://github.com/Xahau/xahaud.git
synced 2026-01-09 17:25:18 +00:00
Compare commits
5 Commits
fix-warnin
...
sus_pat
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
95e4ce89c7 | ||
|
|
b9ac76f11f | ||
|
|
120ecc19c2 | ||
|
|
0ac4ba939a | ||
|
|
80a7197590 |
@@ -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
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 {
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"))
|
||||
{
|
||||
|
||||
@@ -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 =
|
||||
|
||||
@@ -8,13 +8,18 @@ files_changed=$(git diff --name-only --relative HEAD~1 HEAD)
|
||||
|
||||
# Loop through each file and search for the patterns
|
||||
for file in $files_changed; do
|
||||
# Skip if the file is Import_test.cpp (exact filename match regardless of path)
|
||||
if [[ "$(basename "$file")" == "Import_test.cpp" ]]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
# Construct the absolute path
|
||||
absolute_path="$repo_root/$file"
|
||||
|
||||
# Check if the file exists (it might have been deleted)
|
||||
if [ -f "$absolute_path" ]; then
|
||||
# Search the file for the given patterns
|
||||
grep_output=$(grep -n -E '(([^rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz]|^)(s|p)[rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz]{25,60}([^(]|$)))|([^A-Fa-f0-9](02|03|ED)[A-Fa-f0-9]{64})' "$absolute_path")
|
||||
# Search the file for the given patterns, but exclude lines containing 'public_key'
|
||||
grep_output=$(grep -n -E '(([^rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz]|^)(s|p)[rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz]{25,60}([^(]|$)))|([^A-Fa-f0-9](02|03|ED)[A-Fa-f0-9]{64})' "$absolute_path" | grep -v "public_key")
|
||||
|
||||
# Check if grep found any matches
|
||||
if [ ! -z "$grep_output" ]; then
|
||||
@@ -25,7 +30,3 @@ for file in $files_changed; do
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
# If the loop completes without finding any suspicious patterns
|
||||
echo "Success: No suspicious patterns found in the diff."
|
||||
exit 0
|
||||
Reference in New Issue
Block a user