mirror of
https://github.com/XRPLF/rippled.git
synced 2026-06-03 16:56:48 +00:00
Copilot review feedback
This commit is contained in:
@@ -486,7 +486,7 @@ SHAMap::addRootNode(
|
||||
intr_ptr::SharedPtr<SHAMapTreeNode> rootNode,
|
||||
SHAMapSyncFilter const* filter)
|
||||
{
|
||||
XRPL_ASSERT(rootNode, "xrpl::SHAMap::addKnownNode : non-null root node");
|
||||
XRPL_ASSERT(rootNode, "xrpl::SHAMap::addRootNode : non-null root node");
|
||||
if (!rootNode)
|
||||
{
|
||||
JLOG(journal_.error()) << "Null node received";
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#include <test/jtx.h>
|
||||
#include <test/jtx/Env.h>
|
||||
#include <test/shamap/common.h>
|
||||
|
||||
#include <xrpld/app/ledger/detail/LedgerNodeHelpers.h>
|
||||
|
||||
@@ -3252,6 +3252,8 @@ PeerImp::processLedgerRequest(std::shared_ptr<protocol::TMGetLedger> const& m)
|
||||
|
||||
try
|
||||
{
|
||||
auto const useLedgerNodeDepth = supportsFeature(ProtocolFeature::LedgerNodeDepth);
|
||||
|
||||
if (map->getNodeFat(*shaMapNodeId, data, fatLeaves, queryDepth))
|
||||
{
|
||||
JLOG(p_journal_.trace())
|
||||
@@ -3271,7 +3273,7 @@ PeerImp::processLedgerRequest(std::shared_ptr<protocol::TMGetLedger> const& m)
|
||||
// we always set the node ID. However, when it is supported then we only set
|
||||
// it for inner nodes, while for leaf nodes we set the node depth instead.
|
||||
auto const& nodeID = std::get<0>(d);
|
||||
if (!supportsFeature(ProtocolFeature::LedgerNodeDepth))
|
||||
if (!useLedgerNodeDepth)
|
||||
node->set_nodeid(nodeID.getRawString());
|
||||
else if (std::get<2>(d))
|
||||
node->set_depth(nodeID.getDepth());
|
||||
|
||||
Reference in New Issue
Block a user