Skip to content
Open
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/test/rpc/Subscribe_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -872,7 +872,7 @@ class Subscribe_test : public beast::unit_test::suite
for (int i = 0; i < numReplies; ++i)
{
std::uint32_t idx{0};
auto reply = wsc.getMsg(100ms);
auto reply = wsc.getMsg(1s);
if (reply)
{
auto r = *reply;
Expand Down
11 changes: 9 additions & 2 deletions src/xrpld/overlay/detail/PeerImp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1351,8 +1351,8 @@
{
// If we've never been in synch, there's nothing we can do
// with a transaction
JLOG(p_journal_.debug()) << "Ignoring incoming transaction: "
<< "Need network ledger";
JLOG(p_journal_.debug())
<< "Ignoring incoming transaction: " << "Need network ledger";
return;
}

Expand Down Expand Up @@ -2618,6 +2618,13 @@
newObj.set_ledgerseq(obj.ledgerseq());

// VFALCO NOTE "seq" in the message is obsolete

// Check if by adding this object, reply has reached its
// limit
if (reply.objects_size() == Tuning::hardMaxReplyNodes)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am putting this check here instead of limiting the for-loop itself because after we query a node by hash, we check for its validity, meaning, there might be invalid/unregistered hashes in the request. So, we shouldn't count them towards reply size.

{
break;

Check warning on line 2626 in src/xrpld/overlay/detail/PeerImp.cpp

View check run for this annotation

Codecov / codecov/patch

src/xrpld/overlay/detail/PeerImp.cpp#L2626

Added line #L2626 was not covered by tests
}
}
}
}
Expand Down
Loading