mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
This reverts commit dd5e6559dd. It has
introduced a regression causing slow close times and syncing issues.
A fix will be attempted later.
This commit is contained in:
@@ -242,33 +242,6 @@ class HashRouter_test : public beast::unit_test::suite
|
||||
BEAST_EXPECT(router.shouldProcess(key, peer, flags, 1s));
|
||||
}
|
||||
|
||||
void
|
||||
testProcessPeer()
|
||||
{
|
||||
using namespace std::chrono_literals;
|
||||
TestStopwatch stopwatch;
|
||||
HashRouter router(stopwatch, 5s);
|
||||
uint256 const key(1);
|
||||
HashRouter::PeerShortID peer1 = 1;
|
||||
HashRouter::PeerShortID peer2 = 2;
|
||||
auto const timeout = 2s;
|
||||
|
||||
BEAST_EXPECT(router.shouldProcessForPeer(key, peer1, timeout));
|
||||
BEAST_EXPECT(!router.shouldProcessForPeer(key, peer1, timeout));
|
||||
++stopwatch;
|
||||
BEAST_EXPECT(!router.shouldProcessForPeer(key, peer1, timeout));
|
||||
BEAST_EXPECT(router.shouldProcessForPeer(key, peer2, timeout));
|
||||
BEAST_EXPECT(!router.shouldProcessForPeer(key, peer2, timeout));
|
||||
++stopwatch;
|
||||
BEAST_EXPECT(router.shouldProcessForPeer(key, peer1, timeout));
|
||||
BEAST_EXPECT(!router.shouldProcessForPeer(key, peer2, timeout));
|
||||
++stopwatch;
|
||||
BEAST_EXPECT(router.shouldProcessForPeer(key, peer2, timeout));
|
||||
++stopwatch;
|
||||
BEAST_EXPECT(router.shouldProcessForPeer(key, peer1, timeout));
|
||||
BEAST_EXPECT(!router.shouldProcessForPeer(key, peer2, timeout));
|
||||
}
|
||||
|
||||
public:
|
||||
void
|
||||
run() override
|
||||
@@ -279,7 +252,6 @@ public:
|
||||
testSetFlags();
|
||||
testRelay();
|
||||
testProcess();
|
||||
testProcessPeer();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -322,11 +322,6 @@ public:
|
||||
{
|
||||
return false;
|
||||
}
|
||||
std::set<std::optional<uint64_t>>
|
||||
releaseRequestCookies(uint256 const& requestHash) override
|
||||
{
|
||||
return {};
|
||||
}
|
||||
|
||||
bool ledgerReplayEnabled_;
|
||||
PublicKey nodePublicKey_;
|
||||
|
||||
@@ -151,7 +151,6 @@ struct base_uint_test : beast::unit_test::suite
|
||||
uset.insert(u);
|
||||
BEAST_EXPECT(raw.size() == u.size());
|
||||
BEAST_EXPECT(to_string(u) == "0102030405060708090A0B0C");
|
||||
BEAST_EXPECT(to_short_string(u) == "01020304...");
|
||||
BEAST_EXPECT(*u.data() == 1);
|
||||
BEAST_EXPECT(u.signum() == 1);
|
||||
BEAST_EXPECT(!!u);
|
||||
@@ -174,7 +173,6 @@ struct base_uint_test : beast::unit_test::suite
|
||||
test96 v{~u};
|
||||
uset.insert(v);
|
||||
BEAST_EXPECT(to_string(v) == "FEFDFCFBFAF9F8F7F6F5F4F3");
|
||||
BEAST_EXPECT(to_short_string(v) == "FEFDFCFB...");
|
||||
BEAST_EXPECT(*v.data() == 0xfe);
|
||||
BEAST_EXPECT(v.signum() == 1);
|
||||
BEAST_EXPECT(!!v);
|
||||
@@ -195,7 +193,6 @@ struct base_uint_test : beast::unit_test::suite
|
||||
test96 z{beast::zero};
|
||||
uset.insert(z);
|
||||
BEAST_EXPECT(to_string(z) == "000000000000000000000000");
|
||||
BEAST_EXPECT(to_short_string(z) == "00000000...");
|
||||
BEAST_EXPECT(*z.data() == 0);
|
||||
BEAST_EXPECT(*z.begin() == 0);
|
||||
BEAST_EXPECT(*std::prev(z.end(), 1) == 0);
|
||||
@@ -216,7 +213,6 @@ struct base_uint_test : beast::unit_test::suite
|
||||
BEAST_EXPECT(n == z);
|
||||
n--;
|
||||
BEAST_EXPECT(to_string(n) == "FFFFFFFFFFFFFFFFFFFFFFFF");
|
||||
BEAST_EXPECT(to_short_string(n) == "FFFFFFFF...");
|
||||
n = beast::zero;
|
||||
BEAST_EXPECT(n == z);
|
||||
|
||||
@@ -227,7 +223,6 @@ struct base_uint_test : beast::unit_test::suite
|
||||
test96 x{zm1 ^ zp1};
|
||||
uset.insert(x);
|
||||
BEAST_EXPECTS(to_string(x) == "FFFFFFFFFFFFFFFFFFFFFFFE", to_string(x));
|
||||
BEAST_EXPECTS(to_short_string(x) == "FFFFFFFF...", to_short_string(x));
|
||||
|
||||
BEAST_EXPECT(uset.size() == 4);
|
||||
|
||||
|
||||
@@ -87,8 +87,8 @@ public:
|
||||
negotiateProtocolVersion("XRPL/2.2") == make_protocol(2, 2));
|
||||
BEAST_EXPECT(
|
||||
negotiateProtocolVersion(
|
||||
"RTXP/1.2, XRPL/2.2, XRPL/2.3, XRPL/2.4, XRPL/999.999") ==
|
||||
make_protocol(2, 3));
|
||||
"RTXP/1.2, XRPL/2.2, XRPL/2.3, XRPL/999.999") ==
|
||||
make_protocol(2, 2));
|
||||
BEAST_EXPECT(
|
||||
negotiateProtocolVersion("XRPL/999.999, WebSocket/1.0") ==
|
||||
std::nullopt);
|
||||
|
||||
@@ -182,11 +182,6 @@ public:
|
||||
removeTxQueue(const uint256&) override
|
||||
{
|
||||
}
|
||||
std::set<std::optional<uint64_t>>
|
||||
releaseRequestCookies(uint256 const& requestHash) override
|
||||
{
|
||||
return {};
|
||||
}
|
||||
};
|
||||
|
||||
/** Manually advanced clock. */
|
||||
|
||||
Reference in New Issue
Block a user