mirror of
https://github.com/Xahau/xahaud.git
synced 2026-01-09 09:15:17 +00:00
Compare commits
2 Commits
memory-tes
...
ledger_siz
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e2261ac595 | ||
|
|
85a6536f2d |
@@ -726,7 +726,6 @@ if (tests)
|
|||||||
src/test/app/LedgerReplay_test.cpp
|
src/test/app/LedgerReplay_test.cpp
|
||||||
src/test/app/LoadFeeTrack_test.cpp
|
src/test/app/LoadFeeTrack_test.cpp
|
||||||
src/test/app/Manifest_test.cpp
|
src/test/app/Manifest_test.cpp
|
||||||
src/test/app/Memory_test.cpp
|
|
||||||
src/test/app/MultiSign_test.cpp
|
src/test/app/MultiSign_test.cpp
|
||||||
src/test/app/NetworkID_test.cpp
|
src/test/app/NetworkID_test.cpp
|
||||||
src/test/app/NFToken_test.cpp
|
src/test/app/NFToken_test.cpp
|
||||||
|
|||||||
@@ -733,7 +733,7 @@ private:
|
|||||||
|
|
||||||
RCLConsensus mConsensus;
|
RCLConsensus mConsensus;
|
||||||
|
|
||||||
ConsensusPhase mLastConsensusPhase = ConsensusPhase::unknown;
|
ConsensusPhase mLastConsensusPhase;
|
||||||
|
|
||||||
LedgerMaster& m_ledgerMaster;
|
LedgerMaster& m_ledgerMaster;
|
||||||
|
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ public:
|
|||||||
std::uint32_t minimumTxnInLedgerSA = 1000;
|
std::uint32_t minimumTxnInLedgerSA = 1000;
|
||||||
/// Number of transactions per ledger that fee escalation "works
|
/// Number of transactions per ledger that fee escalation "works
|
||||||
/// towards".
|
/// towards".
|
||||||
std::uint32_t targetTxnInLedger = 256;
|
std::uint32_t targetTxnInLedger = 1000;
|
||||||
/** Optional maximum allowed value of transactions per ledger before
|
/** Optional maximum allowed value of transactions per ledger before
|
||||||
fee escalation kicks in. By default, the maximum is an emergent
|
fee escalation kicks in. By default, the maximum is an emergent
|
||||||
property of network, validator, and consensus performance. This
|
property of network, validator, and consensus performance. This
|
||||||
|
|||||||
@@ -101,9 +101,6 @@ to_string(ConsensusMode m)
|
|||||||
consensus will internally go back to open (see Consensus::handleWrongLedger).
|
consensus will internally go back to open (see Consensus::handleWrongLedger).
|
||||||
*/
|
*/
|
||||||
enum class ConsensusPhase {
|
enum class ConsensusPhase {
|
||||||
//! We dont know the ConsensusPhase
|
|
||||||
unknown,
|
|
||||||
|
|
||||||
//! We haven't closed our ledger yet, but others might have
|
//! We haven't closed our ledger yet, but others might have
|
||||||
open,
|
open,
|
||||||
|
|
||||||
|
|||||||
@@ -240,7 +240,7 @@ public:
|
|||||||
bool LEDGER_REPLAY = false;
|
bool LEDGER_REPLAY = false;
|
||||||
|
|
||||||
// Work queue limits
|
// Work queue limits
|
||||||
int MAX_TRANSACTIONS = 250;
|
int MAX_TRANSACTIONS = 1000;
|
||||||
static constexpr int MAX_JOB_QUEUE_TX = 1000;
|
static constexpr int MAX_JOB_QUEUE_TX = 1000;
|
||||||
static constexpr int MIN_JOB_QUEUE_TX = 100;
|
static constexpr int MIN_JOB_QUEUE_TX = 100;
|
||||||
|
|
||||||
|
|||||||
@@ -182,7 +182,6 @@ Value::Value(ValueType type) : type_(type), allocated_(0)
|
|||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
case nullValue:
|
case nullValue:
|
||||||
value_.map_ = nullptr;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case intValue:
|
case intValue:
|
||||||
|
|||||||
@@ -201,30 +201,24 @@ Door<Handler>::Detector::do_detect(boost::asio::yield_context do_yield)
|
|||||||
buf.data(),
|
buf.data(),
|
||||||
std::move(stream_)))
|
std::move(stream_)))
|
||||||
sp->run();
|
sp->run();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
else
|
if (auto sp = ios().template emplace<PlainHTTPPeer<Handler>>(
|
||||||
{
|
port_,
|
||||||
if (auto sp = ios().template emplace<PlainHTTPPeer<Handler>>(
|
handler_,
|
||||||
port_,
|
ioc_,
|
||||||
handler_,
|
j_,
|
||||||
ioc_,
|
remote_address_,
|
||||||
j_,
|
buf.data(),
|
||||||
remote_address_,
|
std::move(stream_)))
|
||||||
buf.data(),
|
sp->run();
|
||||||
std::move(stream_)))
|
return;
|
||||||
sp->run();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
if (ec != boost::asio::error::operation_aborted)
|
||||||
{
|
{
|
||||||
if (ec != boost::asio::error::operation_aborted)
|
JLOG(j_.trace()) << "Error detecting ssl: " << ec.message() << " from "
|
||||||
{
|
<< remote_address_;
|
||||||
JLOG(j_.trace()) << "Error detecting ssl: " << ec.message() << " from "
|
|
||||||
<< remote_address_;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this->close();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -1,93 +0,0 @@
|
|||||||
//------------------------------------------------------------------------------
|
|
||||||
/*
|
|
||||||
This file is part of rippled: https://github.com/ripple/rippled
|
|
||||||
Copyright (c) 2023 XRPL-Labs
|
|
||||||
|
|
||||||
Permission to use, copy, modify, and/or distribute this software for any
|
|
||||||
purpose with or without fee is hereby granted, provided that the above
|
|
||||||
copyright notice and this permission notice appear in all copies.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
||||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
||||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
||||||
ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
||||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
||||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
||||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
||||||
*/
|
|
||||||
//==============================================================================
|
|
||||||
|
|
||||||
#include <ripple/protocol/Feature.h>
|
|
||||||
#include <ripple/protocol/TxFlags.h>
|
|
||||||
#include <ripple/protocol/jss.h>
|
|
||||||
#include <test/jtx.h>
|
|
||||||
|
|
||||||
namespace ripple {
|
|
||||||
namespace test {
|
|
||||||
|
|
||||||
class Memory_test : public beast::unit_test::suite
|
|
||||||
{
|
|
||||||
void
|
|
||||||
testPayment(FeatureBitset features)
|
|
||||||
{
|
|
||||||
testcase("payment");
|
|
||||||
|
|
||||||
using namespace test::jtx;
|
|
||||||
using namespace std::literals;
|
|
||||||
|
|
||||||
Env env{*this, envconfig(), features};
|
|
||||||
|
|
||||||
auto const account = Account("alice");
|
|
||||||
env.fund(XRP(1000), account);
|
|
||||||
env.close();
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
testHook(FeatureBitset features)
|
|
||||||
{
|
|
||||||
testcase("hook");
|
|
||||||
|
|
||||||
using namespace test::jtx;
|
|
||||||
using namespace std::literals;
|
|
||||||
|
|
||||||
Env env{*this, envconfig(), features};
|
|
||||||
|
|
||||||
auto const account = Account("alice");
|
|
||||||
auto const dest = Account("bob");
|
|
||||||
env.fund(XRP(10000), account, dest);
|
|
||||||
env.close();
|
|
||||||
|
|
||||||
env(genesis::setAcceptHook(account), fee(XRP(2)));
|
|
||||||
env.close();
|
|
||||||
|
|
||||||
env(genesis::setAcceptHook(dest), fee(XRP(2)));
|
|
||||||
env.close();
|
|
||||||
|
|
||||||
for (int i = 0; i < 2; ++i)
|
|
||||||
{
|
|
||||||
env(pay(account, dest, XRP(2)), fee(XRP(1)));
|
|
||||||
env.close();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
testWithFeats(FeatureBitset features)
|
|
||||||
{
|
|
||||||
// testPayment(features);
|
|
||||||
testHook(features);
|
|
||||||
}
|
|
||||||
|
|
||||||
public:
|
|
||||||
void
|
|
||||||
run() override
|
|
||||||
{
|
|
||||||
using namespace test::jtx;
|
|
||||||
auto const sa = supported_amendments();
|
|
||||||
testWithFeats(sa);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
BEAST_DEFINE_TESTSUITE(Memory, app, ripple);
|
|
||||||
|
|
||||||
} // namespace test
|
|
||||||
} // namespace ripple
|
|
||||||
Reference in New Issue
Block a user