mirror of
https://github.com/XRPLF/rippled.git
synced 2026-07-27 17:10:46 +00:00
chore: Set ColumnLimit to 120 in clang-format (#6288)
This change updates the ColumnLimit from 80 to 120, and applies clang-format to reformat the code.
This commit is contained in:
@@ -97,27 +97,17 @@ class TMGetObjectByHash_test : public beast::unit_test::suite
|
||||
{
|
||||
auto& overlay = dynamic_cast<OverlayImpl&>(env.app().overlay());
|
||||
boost::beast::http::request<boost::beast::http::dynamic_body> request;
|
||||
auto stream_ptr = std::make_unique<stream_type>(
|
||||
socket_type(env.app().getIOContext()), *context_);
|
||||
auto stream_ptr = std::make_unique<stream_type>(socket_type(env.app().getIOContext()), *context_);
|
||||
|
||||
beast::IP::Endpoint local(
|
||||
boost::asio::ip::make_address("172.1.1.1"), 51235);
|
||||
beast::IP::Endpoint remote(
|
||||
boost::asio::ip::make_address("172.1.1.2"), 51235);
|
||||
beast::IP::Endpoint local(boost::asio::ip::make_address("172.1.1.1"), 51235);
|
||||
beast::IP::Endpoint remote(boost::asio::ip::make_address("172.1.1.2"), 51235);
|
||||
|
||||
PublicKey key(std::get<0>(randomKeyPair(KeyType::ed25519)));
|
||||
auto consumer = overlay.resourceManager().newInboundEndpoint(remote);
|
||||
auto [slot, _] = overlay.peerFinder().new_inbound_slot(local, remote);
|
||||
|
||||
auto peer = std::make_shared<PeerTest>(
|
||||
env.app(),
|
||||
slot,
|
||||
std::move(request),
|
||||
key,
|
||||
protocolVersion_,
|
||||
consumer,
|
||||
std::move(stream_ptr),
|
||||
overlay);
|
||||
env.app(), slot, std::move(request), key, protocolVersion_, consumer, std::move(stream_ptr), overlay);
|
||||
|
||||
overlay.add_active(peer);
|
||||
return peer;
|
||||
@@ -138,11 +128,7 @@ class TMGetObjectByHash_test : public beast::unit_test::suite
|
||||
hashes.push_back(hash);
|
||||
|
||||
Blob data(100, static_cast<unsigned char>(i % 256));
|
||||
nodeStore.store(
|
||||
hotLEDGER,
|
||||
std::move(data),
|
||||
hash,
|
||||
nodeStore.earliestLedgerSeq());
|
||||
nodeStore.store(hotLEDGER, std::move(data), hash, nodeStore.earliestLedgerSeq());
|
||||
}
|
||||
|
||||
// Create a request with more objects than hardMaxReplyNodes
|
||||
@@ -182,14 +168,12 @@ class TMGetObjectByHash_test : public beast::unit_test::suite
|
||||
BEAST_EXPECT(sentMessage != nullptr);
|
||||
|
||||
// Parse the reply message
|
||||
auto const& buffer =
|
||||
sentMessage->getBuffer(compression::Compressed::Off);
|
||||
auto const& buffer = sentMessage->getBuffer(compression::Compressed::Off);
|
||||
|
||||
BEAST_EXPECT(buffer.size() > 6);
|
||||
// Skip the message header (6 bytes: 4 for size, 2 for type)
|
||||
protocol::TMGetObjectByHash reply;
|
||||
BEAST_EXPECT(
|
||||
reply.ParseFromArray(buffer.data() + 6, buffer.size() - 6) == true);
|
||||
BEAST_EXPECT(reply.ParseFromArray(buffer.data() + 6, buffer.size() - 6) == true);
|
||||
|
||||
// Verify the reply is limited to expectedReplySize
|
||||
BEAST_EXPECT(reply.objects_size() == expectedReplySize);
|
||||
|
||||
Reference in New Issue
Block a user